summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-05-07 21:53:11 -0700
committerKeith Packard <keithp@keithp.com>2012-05-07 21:53:11 -0700
commitb5b898264077fcada29e73efa28dcbe4729f2709 (patch)
tree6d81d0ecf467d35fbfc0d2316a2604b288f1fe78
parent73c26f39b1a08fcc13e23a5b1a4293bc7df9f163 (diff)
altosui: Output recorded clock tick in CSV files
This allows eeprom and telem files to be correlated accurately Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altosui/AltosCSV.java11
1 files 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<AltosRecord> 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);
}