gimbal: don't spoof gimbal device (#24271)

The current approach was wrong because the gimbal protocol now
handles the case properly where the autopilot is in charge of a
non-MAVLink gimbal.

This means that we don't need to send message "as if we were a gimbal
device" and instead set thet gimbal_device_id to 1 (up to 6) to indicate
we are in charge or a non-MAVLink gimbal.
This commit is contained in:
Julian Oes
2025-01-31 12:59:41 +13:00
committed by GitHub
parent 4c2e69b2e6
commit a9214b3aa3
4 changed files with 22 additions and 41 deletions
@@ -115,7 +115,7 @@ private:
const float _yaw_min = NAN; // infinite yaw
const float _yaw_max = NAN; // infinite yaw
const uint8_t _gimbal_device_id = 154; // TODO the implementation differs from the protocol
const uint8_t _gimbal_device_id = 1; // Gimbal is implemented by the same component: options are 1..6
uint16_t _gimbal_device_flags = 0; // GIMBAL_DEVICE_FLAGS
bool init(const std::string &world_name, const std::string &model_name);