put the timestamp at last

This commit is contained in:
Determinant 2020-03-28 22:51:31 -04:00
parent eb1d42e47a
commit 8ba24e8c3b
1 changed files with 7 additions and 7 deletions

View File

@ -883,13 +883,6 @@ static void modesSendStratuxOutput(struct modesMessage *mm, struct aircraft *a)
time_t received = (time_t) (mm->sysTimestampMsg / 1000);
localtime_r(&received, &stTime_receive);
// Time message received (based on system clock). Format is 2016-02-20T06:35:43.155Z
p += sprintf(p, "\"Timestamp\":\"%04d-%02d-%02dT%02d:%02d:%02d.%03dZ\"",
(stTime_receive.tm_year+1900),(stTime_receive.tm_mon+1),
stTime_receive.tm_mday, stTime_receive.tm_hour,
stTime_receive.tm_min, stTime_receive.tm_sec,
(unsigned)(mm->sysTimestampMsg % 1000));
//// callsign
if (mm->callsign_valid)
p += sprintf(p, "\"Tail\":\"%s\",", mm->callsign);
@ -1013,6 +1006,13 @@ static void modesSendStratuxOutput(struct modesMessage *mm, struct aircraft *a)
else
p += sprintf(p, "\"Emitter_category\":null,");
// Time message received (based on system clock). Format is 2016-02-20T06:35:43.155Z
p += sprintf(p, "\"Timestamp\":\"%04d-%02d-%02dT%02d:%02d:%02d.%03dZ\"",
(stTime_receive.tm_year+1900),(stTime_receive.tm_mon+1),
stTime_receive.tm_mday, stTime_receive.tm_hour,
stTime_receive.tm_min, stTime_receive.tm_sec,
(unsigned)(mm->sysTimestampMsg % 1000));
p += sprintf(p, "}\r\n");
completeWrite(&Modes.stratux_out, p);