Skip to content

Export text telemetry values to CSV - #53

Open
CAOShurong wants to merge 1 commit into
nesnes:mainfrom
CAOShurong:codex/fix-csv-text-export
Open

Export text telemetry values to CSV#53
CAOShurong wants to merge 1 commit into
nesnes:mainfrom
CAOShurong:codex/fix-csv-text-export

Conversation

@CAOShurong

Copy link
Copy Markdown

Fixes #41.

Text telemetry was present in the session and JSON export, but the CSV loop only wrote values accepted by isFinite. Every string therefore produced an empty cell even though its column header was included.

This change gives CSV cells one formatter: finite numbers keep the selected decimal separator, text values are emitted, embedded quotes are escaped according to CSV rules, and missing or non-finite numeric values remain empty. It also adds a focused regression test covering mixed numeric/text timestamps, comma-containing and quoted text, comma decimals, and invalid numeric data.

Validation:

  • Reproduced on current main (25b91ac): a text column named state was exported, but both warming and ready values were absent.
  • npm run test:csv passed on Node 25.9.0.
  • The same regression test passed on Node 14.21.3, matching the repository's existing packaged-server target.
  • Started the real Teleplot server, sent two numeric and two |t text telemetry packets over UDP, then used headless Chromium to export from the loaded web UI. The downloaded CSV contained both numeric values and both text values, including ready, "steady" with correct CSV escaping; the page reported no console or runtime errors.
  • npm pack --dry-run --json completed and included the regression test.

This is independent of #52 and does not change serial input handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export to CSV doesn't record text

1 participant