ArduCopter: Enable MSG_BATTERY2 through Mavlink

For allow to show battery_2 voltage and current on GCS.
This commit is contained in:
Dario Lindo Andres 2015-04-15 12:29:52 +02:00 committed by Randy Mackay
parent f8a6684c12
commit 7dbd6c8509
1 changed files with 4 additions and 1 deletions

View File

@ -646,7 +646,9 @@ bool GCS_MAVLINK::try_send_message(enum ap_message id)
break; // just here to prevent a warning
case MSG_BATTERY2:
break; // just here to prevent a warning
CHECK_PAYLOAD_SIZE(BATTERY2);
gcs[chan-MAVLINK_COMM_0].send_battery2(battery);
break;
}
return true;
@ -863,6 +865,7 @@ GCS_MAVLINK::data_stream_send(void)
#if AP_TERRAIN_AVAILABLE
send_message(MSG_TERRAIN);
#endif
send_message(MSG_BATTERY2);
send_message(MSG_MOUNT_STATUS);
send_message(MSG_OPTICAL_FLOW);
send_message(MSG_GIMBAL_REPORT);