Comments (2)
Need to test the final code, but it depends on @kevinl03's scripts so not a priority until they are finalized.
from vcu-fw.
Created a simple encoding scheme instead of using utf-8
to make it easier for the firmware to manage incoming messages. More details here:
This is what the pseudocode would look like from both sides:
# Python code
def throttle_encode(a1: int, a2: int) -> bytes:
value = (a1-1268) | (a2-410)<< 13
return value.to_bytes(3, byteorder='little')
apps1, apps2 = 1062, 538
print(apps1, apps2)
message = phantom_encode(apps1, apps2)
print(f'Sending {len(message)=} packets')
# VCU Firmware code
msg = int.from_bytes(message, 'little')
apps1_val = (msg & 0b111111111111) + 1268
apps2_val = ((msg & 0b1111111111 << 13) >> 13) + 410
print(apps1_val, apps2_val)
from vcu-fw.
Related Issues (20)
- Update throttle encoding scheme HOT 1
- Schedule CAN transmissions
- Handle CAN messages HOT 1
- Implement capture logs
- Move to tractive off state when high voltage is off
- Output relevant signals during a severe fault scenario HOT 4
- Implement BOTS logic HOT 5
- Modify TSAL logic for new Power PCB design HOT 2
- Design and implement variable polling commands
- Handle SET/RESET logic HOT 3
- Add SET/RESET signal to VCU simulation
- Configure interrupt to detect RTD Switch
- Write ISR for BOTS
- Write ISR for SET/RESET
- Research new APPS and BSE HOT 1
- Read FSAE rules and identify unit tests for VCU
- Create VCU Simulation Framework for Integration Testing HOT 8
- Implement Unit Tests for VCU Firmware
- Create a simple unit test for one fault event
- Write driver for LV monitor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcu-fw.