7 Commits

Author SHA1 Message Date
jonny_l480
a6a630af44 Add boost outer tire, Add ratio-threshold, Fix motorctl timeout
Rework joystick command generation
Fix timeout no commands received in motorctl

Successfully tested this state on actual hardware:
turning behavior is significantly improved - does not get slower when turning anymore

joystick:
    - add boost of inner tire when turning
    - add threshold where ratio snaps to 1
    - optimize structure, logging

control:
    - rename maxDuty to maxDutyStraight to be more clear
    - add methods to change and get new variable RelativeBoostPer for menu item

menu:
    - add new item to set maxRelativeBoost config parameter

motorctl:
    - fix timeout not working:
    previously when not receiving commands for 15s the duty was set to 0 for 1 handle cycle only
2024-03-05 23:59:12 +01:00
jonny_jr9
cef2a841c8 Add menu item Set Max Duty
Add nvs to control.cpp
2024-02-22 23:59:13 +01:00
jonny_jr9
cdfa64fbc0 Add joystick-calibration wizzard (store in nvs), Optimize Menu
- menu:
    - Add item joystick calibration wizzard
    - Add item RESET (clear nvs and restart)
    - Add configuration option to not show/change value. Instead only show confirm message
      apply this to all items only running action
    - Optimize formatting and comments

- main:
    - pass nvsHandle to display task and joystick class

- joystick:
    - Add methods to write and load calibration values (axis min/max adc value) from nvs
    - Add method to get raw adc value
2024-02-21 11:30:36 +01:00
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
9dfe1bddb2 Add chairAdjust driver, Add joystick control
- Add functions that control the relays for adjusting the armchair
  position
- Add function that controls the chair using joystick input
2023-10-08 14:19:04 +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
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