Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedahan/openvizsla2c
https://github.com/jedahan/openvizsla2c
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jedahan/openvizsla2c
- Owner: jedahan
- Created: 2014-12-10T23:02:48.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-12T18:48:22.000Z (about 10 years ago)
- Last Synced: 2024-10-13T01:04:14.054Z (3 months ago)
- Language: CoffeeScript
- Size: 102 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## openvizsla2c
Take an openvizsla dump and turn it into c code
very very janky. this should not be used by anyone.
## Usage
`npm install` to install dependencies.
`npm start [path-to-file]` to run the main conversion script, which will output C code.
`npm test [path-to-file]` to dump in a more pattern-matching for humans friendly format.
The hope is that the test will help us understand the protocol well enough to
deprecate this entire terrible utility.## Assumptions
There are a lot of assumptions in these scripts:
1. Every packet will have one DATA1 payload sent via OUT
2. DATA1 OUT payload will be resent until an ACK is recieved
3. DATA1 IN payload always is 00 00From these assumptions, the process is very simple:
1. Use SETUP as a delimeter of packets
2. Ignore everything until the first DATA0 (payload of SETUP)
3. Ignore everything until the first DATA1 (payload of OUT)There are probably off-by-one errors all over the place