Rover: send_wheel_encoder_distance uses definition for array size

This commit is contained in:
Randy Mackay 2019-01-28 19:06:50 +09:00
parent c0dcb93e4c
commit ce3de6b047
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ void Rover::send_wheel_encoder_distance(mavlink_channel_t chan)
{
// send wheel encoder data using wheel_distance message
if (g2.wheel_encoder.num_sensors() > 0) {
double distances[16] {};
double distances[MAVLINK_MSG_WHEEL_DISTANCE_FIELD_DISTANCE_LEN] {};
for (uint8_t i = 0; i < g2.wheel_encoder.num_sensors(); i++) {
distances[i] = wheel_encoder_last_distance_m[i];
}