message: Make FollowMe Integration test run only if PX4 version >= 1.13
diff: #include "plugins/telemetry/telemetry.h"
  #include "plugins/action/action.h"
  #include "plugins/follow_me/follow_me.h"
  +#include "plugins/info/info.h"
  using namespace mavsdk;
  using namespace std::chrono;
  using namespace std::this_thread;
  +/* Updated FollowMe only works from PX4 v1.13, as it went through refactoring */
  +const int32_t PX4_SW_MAJOR_MINIMUM = 1;
  +const int32_t PX4_SW_MINOR_MINIMUM = 13;
  +bool autopilot_sw_ver_minimum_satisfied(const std::shared_ptr<Info> info);
  +
  +/* Auxilary Functions */
  void print(const FollowMe::Config& config);
  +
  void send_location_updates(
  std::shared_ptr<FollowMe> follow_me, size_t count = 25ul, float rate = 2.f);
  const size_t N_LOCATIONS = 100ul;
  +
  +/* Test FollowMe with a stationary target at one location */
  TEST_F(SitlTest, PX4FollowMeOneLocation)
  {
  Mavsdk mavsdk;
  @@ -36,6 +46,12 @@ TEST_F(SitlTest, PX4FollowMeOneLocation)
  auto telemetry = std::make_shared<Telemetry>(system);
  auto follow_me = std::make_shared<FollowMe>(system);
  auto action = std::make_shared<Action>(system);
  + auto info = std::make_shared<Info>(system);
  +
  + if (!autopilot_sw_ver_minimum_satisfied(info)) {
  + GTEST_SKIP();
  + }
  +
  LogInfo() << "Waiting for system to be ready";
  ASSERT_TRUE(poll_condition_with_timeout(
  [telemetry]() {
  @@ -99,6 +115,8 @@ TEST_F(SitlTest, PX4FollowMeOneLocation)
  telemetry->subscribe_flight_mode(nullptr);
  }
  +
  +/* Test FollowMe with a dynamically moving target */
  TEST_F(SitlTest, PX4FollowMeMultiLocationWithConfig)
  {
  Mavsdk mavsdk;
  @@ -125,6 +143,11 @@ TEST_F(SitlTest, PX4FollowMeMultiLocationWithConfig)
  auto telemetry = std::make_shared<Telemetry>(system);
  auto follow_me = std::make_shared<FollowMe>(system);
  auto action = std::make_shared<Action>(system);
  + auto info = std::make_shared<Info>(system);
  +
  + if (!autopilot_sw_ver_minimum_satisfied(info)) {
  + GTEST_SKIP();
  + }
  LogInfo() << "Waiting for system to be ready";
  ASSERT_TRUE(poll_condition_with_timeout(
  @@ -209,6 +232,26 @@ FollowMe::TargetLocation create_target_location(double latitude_deg, double long
  return location;
  }
  +bool autopilot_sw_ver_minimum_satisfied(const std::shared_ptr<Info> info)
  +{
  + // Check PX4 version running and if too low, skip the test
  + std::pair<Info::Result, Info::Version> version_result = info->get_version();
  + EXPECT_EQ(version_result.first, Info::Result::Success);
  +
  + if (version_result.second.flight_sw_major < PX4_SW_MAJOR_MINIMUM) {
  + return false; // Major version not satisfied
  +
  + } else if (version_result.second.flight_sw_major > PX4_SW_MAJOR_MINIMUM) {
  + return true; // Major version satisfied
  +
  + } else if (version_result.second.flight_sw_minor >= PX4_SW_MINOR_MINIMUM) {
  + return true; // Major version same, minor version satisfied
  +
  + }
  +
  + return false;
  +}
  +
  void send_location_updates(std::shared_ptr<FollowMe> follow_me, size_t count, float rate)
  {
  // TODO: Generate these co-ordinates from an algorithm
  