A lightweight, robust Node.js utility for converting REV Robotics binary log files (.revlog) into the WPILOG format (.wpilog).
This tool allows you to take raw CAN bus logs from valid REV devices (Spark Max, Spark Flex, Servo Hub) and view them in standard FRC analysis tools like AdvantageScope.
You can use revlog-converter as a standalone command-line tool to convert log files.
To use the CLI globally:
npm install -g @rev-robotics/revlog-converter
Convert a file and save it to a specific output path:
revlog-converter input.revlog -o output.wpilog
The tool supports Unix-style piping. You can pipe a binary file into the converter and redirect the output to a file. This is useful for scripting or chaining commands.
cat input.revlog | revlog-converter > output.wpilog
-o, --output <file>: Specify the output filename. If omitted (and not piping to a file), the binary data is written tostdout.-h, --help: Display the help message.
You can import revlog-converter into your own TypeScript or JavaScript projects. The library supports both ES Modules (ESM) and CommonJS (CJS).
npm install @rev-robotics/revlog-converter
Pass file paths directly to the parser. The function handles reading and writing for you.
import { parseREVLOG } from '@rev-robotics/revlog-converter';
async function convertFile() {
try {
// Reads 'match.revlog', converts it, and writes to 'match.wpilog'
await parseREVLOG('./match.revlog', './match.wpilog');
console.log('Conversion successful!');
} catch (err) {
console.error('Conversion failed:', err);
}
}