diff options
author | Christian Gagneraud <cgagneraud@techworks.ie> | 2012-05-25 10:30:26 +0100 |
---|---|---|
committer | Christian Gagneraud <chris@techworks.ie> | 2012-06-05 15:58:02 +0100 |
commit | 452520a8efe303ff8abbaa8b5d4eccc01a478991 (patch) | |
tree | 99f8907c5e36be0d6ad56d32b831c7af542ed2e0 | |
parent | 9194a2eaad655984a6908f69d195e4e17f6a3cd6 (diff) | |
download | gpsd-452520a8efe303ff8abbaa8b5d4eccc01a478991.tar.gz |
[AIS] AtoN: formatting fixes
-rw-r--r-- | gpsd_json.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index ad039af5..39a64e6f 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -1831,40 +1831,34 @@ void json_aivdm_dump(const struct ais_t *ais, JSON_BOOL(ais->type6.dac235fid10.off_pos), JSON_BOOL(ais->type6.dac235fid10.alarm), ais->type6.dac235fid10.stat_ext); -#ifdef __UNUSED__ if (scaled && ais->type6.dac235fid10.ana_int != 0) (void)snprintf(buf + strlen(buf), buflen - strlen(buf), "\"ana_int\":%.2f,", - ais->type6.dac235fid10.ana_int); + ais->type6.dac235fid10.ana_int*0.05); else -#endif /* __UNUSED__ */ (void)snprintf(buf + strlen(buf), buflen - strlen(buf), "\"ana_int\":%u,", ais->type6.dac235fid10.ana_int); -#ifdef __UNUSED__ if (scaled && ais->type6.dac235fid10.ana_ext1 != 0) (void)snprintf(buf + strlen(buf), buflen - strlen(buf), "\"ana_ext1\":%.2f,", - ais->type6.dac235fid10.ana_ext1); + ais->type6.dac235fid10.ana_ext1*0.05); else -#endif /* __UNUSED__ */ (void)snprintf(buf + strlen(buf), buflen - strlen(buf), "\"ana_ext1\":%u,", ais->type6.dac235fid10.ana_ext1); -#ifdef __UNUSED__ if (scaled && ais->type6.dac235fid10.ana_ext2 != 0) (void)snprintf(buf + strlen(buf), buflen - strlen(buf), "\"ana_ext2\":%.2f,", - ais->type6.dac235fid10.ana_ext2); + ais->type6.dac235fid10.ana_ext2*0.05); else -#endif /* __UNUSED__ */ (void)snprintf(buf + strlen(buf), buflen - strlen(buf), "\"ana_ext2\":%u,", ais->type6.dac235fid10.ana_ext2); if (scaled) (void)snprintf(buf + strlen(buf), buflen - strlen(buf), - "\"racon\":%s,\"light\":%s", + "\"racon\":\"%s\",\"light\":\"%s\"", racon_status[ais->type6.dac235fid10.racon], light_status[ais->type6.dac235fid10.light]); else |