message: calibration: add test if telemetry health updates
  The health indicating if a calibration has been done should update after
  a calibration is successful, however, this is not the case because we're
  not updating the parameter in the telemetry plugin because we don't know
  it changed.
diff: #include "global_include.h"
  #include "dronecode_sdk.h"
  #include "plugins/calibration/calibration.h"
  +#include "plugins/params_raw/params_raw.h"
  +#include "plugins/telemetry/telemetry.h"
  using namespace dronecode_sdk;
  using namespace std::placeholders; // for `_1`
  @@ -105,6 +107,43 @@ TEST(HardwareTest, CalibrationGimbalAccelerometer)
  fut.wait();
  }
  +TEST(HardwareTest, CalibrationGyroWithTelemetry)
  +{
  + DronecodeSDK dc;
  +
  + ConnectionResult ret = dc.add_udp_connection();
  + ASSERT_EQ(ret, ConnectionResult::SUCCESS);
  +
  + // Wait for system to connect via heartbeat.
  + std::this_thread::sleep_for(std::chrono::seconds(2));
  + System &system = dc.system();
  + ASSERT_TRUE(system.has_autopilot());
  +
  + // Reset Gyro calibration using param.
  + auto params_raw = std::make_shared<ParamsRaw>(system);
  + params_raw->set_param_int("CAL_GYRO0_ID", 0);
  +
  + // Make sure telemetry reports gyro calibration as false.
  + auto telemetry = std::make_shared<Telemetry>(system);
  + std::this_thread::sleep_for(std::chrono::seconds(2));
  + ASSERT_FALSE(telemetry->health().gyrometer_calibration_ok);
  +
  + // Do gyro calibration.
  + auto calibration = std::make_shared<Calibration>(system);
  +
  + std::promise<void> prom{};
  + std::future<void> fut = prom.get_future();
  +
  + calibration->calibrate_gyro_async(
  + std::bind(&receive_calibration_callback, _1, _2, "gyro", std::ref(prom)));
  +
  + fut.wait();
  +
  + // Now, telemetry should be updated showing that the gyro calibration is ok.
  + std::this_thread::sleep_for(std::chrono::seconds(2));
  + EXPECT_TRUE(telemetry->health().gyrometer_calibration_ok);
  +}
  +
  void receive_calibration_callback(const Calibration::Result result,
  const Calibration::ProgressData &progress_data,
  const std::string &calibration_type,
  @@ -128,4 +167,3 @@ void receive_calibration_callback(const Calibration::Result result,
  prom.set_value();
  }
  }
  -
  