|
|
|
@ -1246,32 +1246,6 @@ void GCS_MAVLINK_Copter::handleMessage(const mavlink_message_t &msg)
@@ -1246,32 +1246,6 @@ void GCS_MAVLINK_Copter::handleMessage(const mavlink_message_t &msg)
|
|
|
|
|
* MAVLink to process packets while waiting for the initialisation to |
|
|
|
|
* complete |
|
|
|
|
*/ |
|
|
|
|
void Copter::mavlink_delay_cb() |
|
|
|
|
{ |
|
|
|
|
static uint32_t last_1hz, last_50hz, last_5s; |
|
|
|
|
|
|
|
|
|
logger.EnableWrites(false); |
|
|
|
|
|
|
|
|
|
uint32_t tnow = 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_Copter::handle_flight_termination(const mavlink_command_long_t &packet) { |
|
|
|
|
MAV_RESULT result = MAV_RESULT_FAILED; |
|
|
|
|
|
|
|
|
|