|
|
|
@ -792,32 +792,6 @@ void GCS_MAVLINK_Sub::handle_rc_channels_override(const mavlink_message_t &msg)
@@ -792,32 +792,6 @@ void GCS_MAVLINK_Sub::handle_rc_channels_override(const mavlink_message_t &msg)
|
|
|
|
|
* MAVLink to process packets while waiting for the initialisation to |
|
|
|
|
* complete |
|
|
|
|
*/ |
|
|
|
|
void Sub::mavlink_delay_cb() |
|
|
|
|
{ |
|
|
|
|
static uint32_t last_1hz, last_50hz, last_5s; |
|
|
|
|
|
|
|
|
|
logger.EnableWrites(false); |
|
|
|
|
|
|
|
|
|
uint32_t tnow = AP_HAL::millis(); |
|
|
|
|
if (tnow - last_1hz > 1000) { |
|
|
|
|
last_1hz = tnow; |
|
|
|
|
gcs().send_message(MSG_HEARTBEAT); |
|
|
|
|
gcs().send_message(MSG_SYS_STATUS); |
|
|
|
|
} |
|
|
|
|
if (tnow - last_50hz > 20) { |
|
|
|
|
last_50hz = tnow; |
|
|
|
|
gcs().update_receive(); |
|
|
|
|
gcs().update_send(); |
|
|
|
|
notify.update(); |
|
|
|
|
} |
|
|
|
|
if (tnow - last_5s > 5000) { |
|
|
|
|
last_5s = tnow; |
|
|
|
|
gcs().send_text(MAV_SEVERITY_INFO, "Initialising APM"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
logger.EnableWrites(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
MAV_RESULT GCS_MAVLINK_Sub::handle_flight_termination(const mavlink_command_long_t &packet) { |
|
|
|
|
if (packet.param1 > 0.5f) { |
|
|
|
|
sub.arming.disarm(); |
|
|
|
|