diff --git a/ArduCopter/GCS_Mavlink.pde b/ArduCopter/GCS_Mavlink.pde index 93f623060f..5ff6a1e294 100644 --- a/ArduCopter/GCS_Mavlink.pde +++ b/ArduCopter/GCS_Mavlink.pde @@ -616,6 +616,11 @@ bool GCS_MAVLINK::try_send_message(enum ap_message id) #endif // MOUNT == ENABLED break; + case MSG_BATTERY2: + CHECK_PAYLOAD_SIZE(BATTERY2); + gcs[chan-MAVLINK_COMM_0].send_battery2(battery); + break; + case MSG_OPTICAL_FLOW: #if OPTFLOW == ENABLED CHECK_PAYLOAD_SIZE(OPTICAL_FLOW); @@ -644,11 +649,6 @@ bool GCS_MAVLINK::try_send_message(enum ap_message id) case MSG_RETRY_DEFERRED: break; // just here to prevent a warning - - case MSG_BATTERY2: - CHECK_PAYLOAD_SIZE(BATTERY2); - gcs[chan-MAVLINK_COMM_0].send_battery2(battery); - break; } return true;