19 Commits

Author SHA1 Message Date
jonny_jr9
a1bb808b62 Rework/simplify chairAdjust - now using a class
- complete rework of chairAdjust.cpp/.hpp
  created a class cControlledRest which is more readable
  and saves a lot of duplicate code

- joystick.cpp: move chair control via joystick to
  chairAdjust.cpp (prevents dependency loop)
- button.cpp: fix bug instant idle when changing to ADJUST_CHAIR

Note: briefly tested this state on a breakout board:
Mode change and call of new class methods works.
2024-02-11 23:22:33 +01:00
jonny_jr9
95f2403163 Add control mode 'ADJUST_CHAIR' (btn 1 short, 1 long)
Add functional mode to control chair position via joystick
Switch to that mode using button 1x short 1x long (prev eject support)
2023-10-08 14:56:19 +02:00
jonny_jr9
81b073bbd9 Fix regular Crash (stack overflow display task)
Fix regular crash caused by display task
2023-09-27 09:32:01 +02:00
jonny_l480
bf3adea17d Config: Update accel and decel to tested values 2023-09-15 18:09:45 +02:00
jonny_jr9
169c809870 Add doc folder, Update gitignore, Add sdkconfigs 2023-09-13 13:59:30 +02:00
jonny_l480
69a421a924 Outsource speedsensor, Display: show speed
- 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
2023-09-12 16:00:20 +02:00
jonny_jr9
47d7e9f3a4 Rework display: separate task, add battery percent
slightly rework hacked display test
- new code structure
- split code in several functions
- add task for display instead of running it in main()
- functions to convert voltage to battery percent charged
- show percentage and voltage on display
2023-09-12 11:49:08 +02:00
jonny_l480
548b5b8d51 Hotfix: swap joystick X/Y pins, log 5V regulator start
jsut re-wired the pcb.
apparently joystick was wired wrong previously
2023-09-11 21:24:38 +02:00
jonny_l480
d9deddf923 Display: show battery voltage, Button longPress=calibrate 2023-09-09 18:03:54 +02:00
jonny_jr9
0804aaf240 Add display library, show battery voltage
untested
2023-09-09 16:51:01 +02:00
jonny_l480
3449bb7f34 Config optimizations (Test-drive)
Successfull test drive with new driver
- set max duty from 90 to 100
- config adjust fading, calibrate joystick, disable deadtime
- disable 1x button cmd
- 8x sport mode: toggle accel not decel
2023-09-09 16:10:18 +02:00
jonny_jr9
27a94d7ab6 Update connection-plan: single-pcb, update pin assignment
update config to work with actual pin assignment in connection plan
2023-09-09 09:38:54 +02:00
jonny_jr9
8e0441b27c Fix stack-overflow, Adjust logging, test-ready
enable all tasks in main for full function test with new driver
2023-09-09 09:38:42 +02:00
jonny_jr9
71b63ebbd3 Make drivers interchangeable, Switch to sabertooth driver
- make motorctl compatible with different drivers
    - pass set function instead of specific motor object
    - add lambda function in config.cpp
- update config to use one new sabertooth driver instead of two single100a
- main test controlled motor
2023-09-08 12:09:52 +02:00
jonny_jr9
98956e2bf8 Create class sabertooth2x60a - new driver functional
currently repeatedly sends test commands from main using a created
instance of that new class
2023-09-07 16:37:14 +02:00
jonny_jr9
a30ec01818 Simple driver test - works
test controlling driver via uart (in main function)
2023-09-07 14:02:48 +02:00
jonny_jr9
f76db1d9bc Outsource http, joystick to common/ and react-app to root
Same reason as before commit
Note: some changes to http were necessary due to global object
- untested!

Also remove unneded duplicate components folder
2023-09-07 12:59:15 +02:00
jonny_jr9
13b896accb Outsource currentsensor, motorctl, motordrivers to common/
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
2023-09-07 12:30:22 +02:00
jonny_jr9
ee5bad53ee Revert to V2.0 single board (additional folder)
New controller will be run with single controller at first...
get single board version from V2.0 and create new folder
(two boards version is kept)
-> copied firmware from e6e586e5855d81ee726bb9a0fbe8ab12def5eeef
2023-09-07 12:17:33 +02:00