Conversation
… for SD logging Two fixes: 1. Streaming output (CSV, JSONL, text) now merges the separate analog and digital protobuf messages into a single output row per sample. The device sends analog and digital data in separate messages with the same timestamp. Previously each was written as its own row, making CSV/JSONL output unusable for data analysis tools. 2. SD card logging now explicitly enables ADC channels and DIO ports before calling StartSdCardLoggingAsync. Without this, the device had no channels enabled and the log file was empty. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review Summary by QodoMerge analog/digital rows and enable channels for SD logging
WalkthroughsDescription• Merge analog and digital protobuf messages into single output rows - Device sends separate messages with same timestamp; now buffered and combined - Fixes CSV/JSONL output for data analysis tools • Enable ADC channels and DIO ports before SD card logging - Automatically enables all channels if none specified via --channels - Prevents empty log files due to disabled channels • Auto-parse CSV and JSON files after SD download - Previously only .bin files were parsed; now all formats supported • Pass device calibration config to SD card file parser - Enables proper voltage scaling of raw ADC values in downloaded files Diagramflowchart LR
A["Device sends analog<br/>and digital messages<br/>with same timestamp"]
B["Buffer analog message<br/>in pendingAnalog"]
C["Match digital message<br/>by timestamp"]
D["Merge into single<br/>output row"]
E["Write CSV/JSONL/text"]
F["Enable ADC channels<br/>and DIO ports"]
G["Start SD card logging"]
H["Download and parse<br/>SD file with device<br/>calibration config"]
A --> B
B --> C
C --> D
D --> E
F --> G
G --> H
File Changes1. Program.cs
|
Code Review by Qodo
1.
|
Add IsValidChannelMask check on --channels input in the SD card logging path, matching the existing validation in the streaming path. Bump NuGet Daqifi.Core from 0.18.0 to 0.19.3 so the default build (without DaqifiCoreProjectPath) includes the APIs this app now uses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
{"analog":[...],"digital":""}followed by{"analog":[],"digital":"00-00"}). Now analog and digital are buffered and merged into a single row per sample across all output formats (text, CSV, JSONL).StartSdCardLoggingAsync, the app now explicitly enables ADC channels (using the device's reportedAnalogInputChannelscount if no--channelsmask is provided) and DIO ports. Without this, the device had no channels enabled and log files were empty.Depends on
Test plan
--serial /dev/cu.usbmodem101 --rate 10 --duration 5 --format csvproduces one row per sample with both analog and digital data--serial /dev/cu.usbmodem101 --rate 10 --duration 5 --format jsonlproduces one JSON object per sample with both analog and digital--serial /dev/cu.usbmodem101 --sd-log-start --sd-log-format csvfollowed by--sd-listshows a new file--serial /dev/cu.usbmodem101 --sd-log-start --sd-log-format protobuffollowed by--sd-listshows a new file🤖 Generated with Claude Code