- move speedsensor files from motorctl pcb to common
- single pcb create and configure global speedsensor objects
- display: create fast slow veryslow loop
- clear display every 30s
- show speed in rpm and km/h
NOTE: speedsensor needs fix, direction unreliable
since board_single uses mostly the same code as board_control and
board_motorctl several files are outsorced to common folder to prevent
dupliate code and different versions
successfully read rotational speed and direction using encoder disk and
optical sensor
custom implementation of incremental encoder using gpio edge interrupt
[untested]
Turn on brake relays in BRAKE state
Also wait certain time for relays to switch before shorting the driver
Add config option for brake relay pin
Initialize pin in constructor
Same functionality as previous commit. But way more stable and clean.
Previous proof of concept approach had issues with random partial or
too large messages due to time based method
Rework send and receive functions to work more stable
- send: encode data with frame (start, end byte)
- receive: read each byte one after the other, assemble message,
handle actual data in handle function
- add semaphore to write operation to prevent parallel write of
different data when called from other tasks
- board_control successfully sends motor commands to board_motorctl
- board_motorctl receives and applies motor commands
note: control pcb currently switches to HTTP mode after startup for testing
with data from ui
- partially commented in code that has to be reworked
- control: send commands via uart instead of to motor objects
- board motorctl handled motor: add timeout when no target data
received (e.g. control pcb offline / uart bugged)
- board motorctl uart: receive motorCommands_t struct and apply data to
target state of handled motors
- types: fix issue with global motorstateStr variable
- outsoruce common files and separate common types from source files (new
common/types.hpp)
- split source files to 2 board folders (relevant only, no duplicate)
- currently boards compile successfull but not functional at all
- comment out currently incompatible code
board_control currently sends a scruct with incrementing values
board_motorctl receives the struct and logs it
also test code for sending, receiving and returning single value
- add second pcb board_control, currently copy of previous board
- not enough pins -> board_control handle ui send motorcommands via uart
board_motorctl handle motors