Repository navigation
Revlog v2 - #10
Open
rylanmoseley wants to merge 4 commits into
Open
Revlog v2#10rylanmoseley wants to merge 4 commits into
rylanmoseley wants to merge 4 commits into
Conversation
Adds node:test tests (npm test) with helpers that build REVLOG files byte by byte and read WPILOG output back. test/fixtures/v1-baseline.json holds what converter 1.0.5 produces for a representative format v1 file, so later changes can be checked against it.
Adds a reader for REVLOG format v2: - The first record decides the format; a v2 header with a newer major version is rejected with a message to update the converter. - Frame records: microsecond timestamps, real frame lengths (CAN FD), and entries named by bus, for example REV/CAN_S0/Spark-3/... v1 files keep their REV/Spark-3/... names. - Devices are looked up by manufacturer and device type. The A301 (manufacturer 3) shares the SPARK's device type; its status frames are decoded with the new A301 DBC as REV/<bus>/A301-<number>/..., and frames from unknown manufacturers are skipped. - Robot state becomes DS:controlWord/enabled (boolean) and DS:controlWord/robotMode (string), the entries AdvantageScope uses to align logs and shade enabled periods. Match info becomes DS:matchInfo/*. - Logger events become REV/StatusLogger/Event, and diagnostics become REV/StatusLogger/<bus>/DroppedFrames running totals. Fixes for v1 files too: - FIRMWARE entries are written only when they change. Logs from older REVLib releases repeat the firmware table every loop, which produced millions of identical records (98% of one 277 MB conversion). - Servo Hub firmware versions were decoded with the SPARK layout (for example "2.1.6400" instead of "25.1.2").
revlog-converter --stats <file> prints the format version, record counts and sizes, time span, per-device frame counts and rates, logger events, and known problems: wrapped timestamps from REVLib 2027 alphas, a logger loop running far faster than 40 Hz, files that are mostly repeated firmware tables, firmware tables written more often than devices change, CAN stream overflows, and a truncated last record. Also exported as analyzeREVLOG/formatStats.
Documents both REVLOG formats, the WPILOG entries the converter writes, --stats and the library API, and adds a changelog. Bumps to 2.0.0 because format v2 files get new entry names; AdvantageScope pins ^1.0.5 and needs an update to pick this up.
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.
No description provided.