mirror of
https://github.com/lucysrausch/hoverboard-firmware-hack.git
synced 2025-08-01 00:24:28 +02:00
minimalistic framing for UART command
copied the uart framing idea from https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC to use: send $AAAA to start frame then steer, speed as usual and XOR($AAAA, steer, speed) as checksum commands that don't match are ignored, and UART DMA is reset hopefully this will set it up to catch the next one re-send frequently.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#define DELAY_IN_MAIN_LOOP 5 // in ms. default 5. it is independent of all the timing critical stuff. do not touch if you do not know what you are doing.
|
||||
|
||||
#define TIMEOUT 5 // number of wrong / missing input commands before emergency off
|
||||
#define START_FRAME 0xAAAA // serial command start-of-frame magic word
|
||||
|
||||
// ############################### GENERAL ###############################
|
||||
|
||||
|
Reference in New Issue
Block a user