mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
Sub: use cork/push wrapper
This commit is contained in:
parent
23b20307af
commit
b16ae19bce
@ -1229,12 +1229,12 @@ void GCS_MAVLINK_Sub::handleMessage(mavlink_message_t* msg)
|
||||
if (is_equal(packet.param1,1.0f) || is_equal(packet.param1,3.0f)) {
|
||||
// Send an invalid signal to the motors to prevent spinning due to neutral (1500) pwm pulse being cut short
|
||||
// For that matter, send an invalid signal to all channels to prevent undesired/unexpected behavior
|
||||
hal.rcout->cork();
|
||||
SRV_Channels::cork();
|
||||
for (int i=0; i<NUM_RC_CHANNELS; i++) {
|
||||
// Set to 1 because 0 is interpreted as flag to ignore update
|
||||
hal.rcout->write(i, 1);
|
||||
}
|
||||
hal.rcout->push();
|
||||
SRV_Channels::push();
|
||||
|
||||
result = MAV_RESULT_ACCEPTED;
|
||||
// send ack before we reboot
|
||||
|
Loading…
Reference in New Issue
Block a user