AP_Notify: resolve compiler warning in Display

This commit is contained in:
Randy Mackay 2017-01-17 21:44:26 +09:00 committed by Lucas De Marchi
parent 497a4bd4a5
commit f0c6fd3038
1 changed files with 2 additions and 1 deletions

View File

@ -499,6 +499,7 @@ void Display::update_gps(uint8_t r)
break;
default:
fixname = gpsfixname[0];
break;
}
snprintf(msg, DISPLAY_MESSAGE_SIZE, "GPS:%s Sats:%u", fixname, AP_Notify::flags.gps_num_sats) ;
draw_text(COLUMN(0), ROW(r), msg);
@ -523,7 +524,7 @@ void Display::update_ekf(uint8_t r)
void Display::update_battery(uint8_t r)
{
char msg [DISPLAY_MESSAGE_SIZE];
snprintf(msg, DISPLAY_MESSAGE_SIZE, "BAT1: %4.2fV", AP_Notify::flags.battery_voltage) ;
snprintf(msg, DISPLAY_MESSAGE_SIZE, "BAT1: %4.2fV", (double)AP_Notify::flags.battery_voltage) ;
draw_text(COLUMN(0), ROW(r), msg);
}
void Display::update_mode(uint8_t r)