mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Mount_SToRM: slow updates to 10hz, reverse yaw, pitch
This commit is contained in:
parent
ab542de769
commit
d2739c5ce5
@ -31,6 +31,14 @@ void AP_Mount_SToRM32::update()
|
||||
return;
|
||||
}
|
||||
|
||||
// throttle updates to 10hz (this assumes update is called at 50hz)
|
||||
static uint8_t counter = 0;
|
||||
counter++;
|
||||
if (counter < 5) {
|
||||
return;
|
||||
}
|
||||
counter = 0;
|
||||
|
||||
// flag to trigger sending target angles to gimbal
|
||||
bool resend_now = false;
|
||||
|
||||
@ -121,6 +129,10 @@ void AP_Mount_SToRM32::send_do_mount_control(float pitch_deg, float roll_deg, fl
|
||||
return;
|
||||
}
|
||||
|
||||
// reverse pitch and yaw control
|
||||
pitch_deg = -pitch_deg;
|
||||
yaw_deg = -yaw_deg;
|
||||
|
||||
// send command_long command containing a do_mount_control command
|
||||
mavlink_msg_command_long_send(_chan,
|
||||
AP_MOUNT_STORM32_SYSID,
|
||||
|
Loading…
Reference in New Issue
Block a user