Skip to content

Commit e676692

Browse files
author
sunpi
committed
Implement 500ms snapshot telemetry logging and split fault events.
Switch USB backup output from per-signal files to a single wide telemetry_snapshot.csv, add fault edge writes to a dedicated Influx measurement, and migrate format assets to the sc-data-format submodule for consistent updates.
1 parent bd1e06c commit e676692

12 files changed

Lines changed: 583 additions & 664 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "sc-data-format"]
2+
path = sc-data-format
3+
url = git@github.com:badgerloop-software/sc-data-format.git

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A lightweight C daemon for Raspberry Pi that reads raw CAN frames from a SocketC
44

55
| Sink | What it does |
66
|------|-------------|
7-
| **CSV logger** | Appends every decoded sample to a per-signal `.csv` file on a USB drive |
7+
| **CSV logger** | Writes one unified wide snapshot CSV (`telemetry_snapshot.csv`) every 500ms |
88
| **InfluxDB** | Batches samples and uploads to InfluxDB Cloud on a configurable interval |
99
| **Serial radio** | Periodically serializes the latest value of every active signal and writes it to a UART radio (e.g. RFD900A) for wireless ground-station reception |
1010

@@ -134,7 +134,7 @@ cp can_telem.conf.example can_telem.conf
134134
```ini
135135
# ── Core ────────────────────────────────────────────────────────────
136136
can_interface = can0
137-
format_file = /home/sunpi/can-telem-cloud/format.json
137+
format_file = /home/sunpi/can-telem-cloud/sc-data-format/format.json
138138
output_dir = /mnt/usb
139139

140140
# ── InfluxDB Cloud (optional) ───────────────────────────────────────
@@ -176,7 +176,7 @@ CLI flags override values in the config file.
176176

177177
## CSV output
178178

179-
One file per signal at `<output_dir>/<signal_name>.csv`:
179+
One unified snapshot file at `<output_dir>/telemetry_snapshot.csv`:
180180

181181
```
182182
timestamp_ns,value,raw_hex
@@ -253,7 +253,7 @@ can-telem-cloud/
253253
│ └── db_watcher.[ch] — SQLite DB watcher for TX signals
254254
├── third_party/
255255
│ └── cJSON.[ch] — JSON parser
256-
├── format.json — (git submodule: sc-data-format)
256+
├── sc-data-format/ git submodule containing format.json and format_exp.md
257257
├── can_telem.conf.example
258258
└── Makefile
259259
```

can_telem.conf.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Keys are case-insensitive. CLI flags (-i, -f, -o) override these values.
33

44
output_dir = /var/tmp/can_telem_logs
5-
format_file = ./format.json
5+
format_file = ./sc-data-format/format.json
66
can_interface = can0
77

88
# --- Optional: InfluxDB Cloud (HTTPS write API v2) ---

format.json

Lines changed: 0 additions & 223 deletions
This file was deleted.

0 commit comments

Comments
 (0)