mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 13:40:34 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user