From b5b898264077fcada29e73efa28dcbe4729f2709 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 7 May 2012 21:53:11 -0700 Subject: [PATCH] altosui: Output recorded clock tick in CSV files This allows eeprom and telem files to be correlated accurately Signed-off-by: Keith Packard --- altosui/AltosCSV.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/altosui/AltosCSV.java b/altosui/AltosCSV.java index cf649db0..9ec21bef 100644 --- a/altosui/AltosCSV.java +++ b/altosui/AltosCSV.java @@ -31,9 +31,9 @@ public class AltosCSV implements AltosWriter { LinkedList pad_records; AltosState state; - static final int ALTOS_CSV_VERSION = 3; + static final int ALTOS_CSV_VERSION = 4; - /* Version 3 format: + /* Version 4 format: * * General info * version number @@ -41,6 +41,7 @@ public class AltosCSV implements AltosWriter { * flight number * callsign * time (seconds since boost) + * clock (tick count / 100) * rssi * link quality * @@ -91,13 +92,13 @@ public class AltosCSV implements AltosWriter { */ void write_general_header() { - out.printf("version,serial,flight,call,time,rssi,lqi"); + out.printf("version,serial,flight,call,time,clock,rssi,lqi"); } void write_general(AltosRecord record) { - out.printf("%s, %d, %d, %s, %8.2f, %4d, %3d", + out.printf("%s, %d, %d, %s, %8.2f, %8.2f, %4d, %3d", ALTOS_CSV_VERSION, record.serial, record.flight, record.callsign, - (double) record.time, + (double) record.time, (double) record.tick / 100.0, record.rssi, record.status & 0x7f); } -- 2.30.2