Fix setFade, Make MASSAGE-mode work again (pre-rework)
MASSAGE mode is now useable again for now.
(no more random driving and unexpected shaking)
A full rework is still planned.
- Fix setFade method (did not change anything when not writing to nvs)
- joystick/massage:
- reverse motor direction every 2nd cycle to preving driving
- simplify modes (now only FW/REV and LEFT/RIGHT)
- use joystick angle to vary the duty cycle
- optimize delay and duty calculation (min max config)
- drop hysteresis (not much use, just much code)
This commit is contained in:
@@ -543,7 +543,7 @@ void controlledArmchair::changeMode(controlMode_t modeNew)
|
||||
|
||||
case controlMode_t::MASSAGE:
|
||||
ESP_LOGW(TAG, "switching to MASSAGE mode -> reducing fading");
|
||||
uint32_t shake_msFadeAccel = 200; // TODO: move this to config
|
||||
uint32_t shake_msFadeAccel = 350; // TODO: move this to config
|
||||
uint32_t shake_msFadeDecel = 0; // TODO: move this to config
|
||||
|
||||
// save currently set normal acceleration config (for restore when leavinge MASSAGE again)
|
||||
|
||||
Reference in New Issue
Block a user