AP_NMEA_Output: fix time format

This commit is contained in:
Aleksey Ploskov 2023-12-29 05:09:50 +03:00 committed by Andrew Tridgell
parent e855c9f46a
commit 81ab6a9461
1 changed files with 2 additions and 2 deletions

View File

@ -111,8 +111,8 @@ void AP_NMEA_Output::update()
struct tm* tm = gmtime(&time_sec);
// format time string
char tstring[11];
snprintf(tstring, sizeof(tstring), "%02u%02u%06.2f", tm->tm_hour, tm->tm_min, tm->tm_sec + (time_usec % 1000000) * 1.0e-6);
char tstring[10];
snprintf(tstring, sizeof(tstring), "%02u%02u%05.2f", tm->tm_hour, tm->tm_min, tm->tm_sec + (time_usec % 1000000) * 1.0e-6);
Location loc;
const auto &gps = AP::gps();