From 01a4477c92e1a38ec02a2c4b4eb656d8131c7484 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Tue, 31 Jul 2018 23:49:05 +0100 Subject: [PATCH] Fix mangled msec part in port 30003 timestamps --- net_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net_io.c b/net_io.c index c91ed9b..5148b6a 100644 --- a/net_io.c +++ b/net_io.c @@ -571,7 +571,7 @@ static void modesSendSBSOutput(struct modesMessage *mm, struct aircraft *a) { // Fields 7 & 8 are the message reception time and date p += sprintf(p, "%04d/%02d/%02d,", (stTime_receive.tm_year+1900),(stTime_receive.tm_mon+1), stTime_receive.tm_mday); - p += sprintf(p, "%02d:%02d:%02d.%03u,", stTime_receive.tm_hour, stTime_receive.tm_min, stTime_receive.tm_sec, (unsigned) (mm->sysTimestampMsg / 1000)); + p += sprintf(p, "%02d:%02d:%02d.%03u,", stTime_receive.tm_hour, stTime_receive.tm_min, stTime_receive.tm_sec, (unsigned) (mm->sysTimestampMsg % 1000)); // Fields 9 & 10 are the current time and date p += sprintf(p, "%04d/%02d/%02d,", (stTime_now.tm_year+1900),(stTime_now.tm_mon+1), stTime_now.tm_mday);