text: // WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited.
  // Edits need to be made to the proto files
  // (see https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/gimbal/gimbal.proto)
  
  #include <iomanip>
  
  #include "gimbal_impl.h"
  #include "plugins/gimbal/gimbal.h"
  
  namespace mavsdk {
  
  Gimbal::Gimbal(System& system) : PluginBase(), _impl{new GimbalImpl(system)} {}
  
  Gimbal::~Gimbal() {}
  
  void Gimbal::set_pitch_and_yaw_async(float pitch_deg, float yaw_deg, const ResultCallback callback)
  {
      _impl->set_pitch_and_yaw_async(pitch_deg, yaw_deg, callback);
  }
  
  Gimbal::Result Gimbal::set_pitch_and_yaw(float pitch_deg, float yaw_deg) const
  {
      return _impl->set_pitch_and_yaw(pitch_deg, yaw_deg);
  }
  
  void Gimbal::set_mode_async(GimbalMode gimbal_mode, const ResultCallback callback)
  {
      _impl->set_mode_async(gimbal_mode, callback);
  }
  
  Gimbal::Result Gimbal::set_mode(GimbalMode gimbal_mode) const
  {
      return _impl->set_mode(gimbal_mode);
  }
  
  void Gimbal::set_roi_location_async(
      double latitude_deg, double longitude_deg, float altitude_m, const ResultCallback callback)
  {
      _impl->set_roi_location_async(latitude_deg, longitude_deg, altitude_m, callback);
  }
  
  Gimbal::Result
  Gimbal::set_roi_location(double latitude_deg, double longitude_deg, float altitude_m) const
  {
      return _impl->set_roi_location(latitude_deg, longitude_deg, altitude_m);
  }
  
  const char* Gimbal::result_str(Gimbal::Result result)
  {
      switch (result) {
          case Gimbal::Result::Unknown:
              return "Unknown result";
          case Gimbal::Result::Success:
              return "Command was accepted";
          case Gimbal::Result::Error:
              return "Error occurred sending the command";
          case Gimbal::Result::Timeout:
              return "Command timed out";
          default:
              return "Unknown";
      }
  }
  
  std::ostream& operator<<(std::ostream& str, Gimbal::Result const& result)
  {
      switch (result) {
          case Gimbal::Result::Unknown:
              return str << "Result Unknown";
          case Gimbal::Result::Success:
              return str << "Result Success";
          case Gimbal::Result::Error:
              return str << "Result Error";
          case Gimbal::Result::Timeout:
              return str << "Result Timeout";
          default:
              return str << "Unknown";
      }
  }
  
  std::ostream& operator<<(std::ostream& str, Gimbal::GimbalMode const& gimbal_mode)
  {
      switch (gimbal_mode) {
          case Gimbal::GimbalMode::YawFollow:
              return str << "Gimbal Mode Yaw Follow";
          case Gimbal::GimbalMode::YawLock:
              return str << "Gimbal Mode Yaw Lock";
          default:
              return str << "Unknown";
      }
  }
  
  } // namespace mavsdk