Honor throttle inversion for command remote input#96
Conversation
There was a problem hiding this comment.
Pull request overview
This PR ensures the inputtilt_invert_throttle configuration is applied to command-driven remote input, so the stored normalized input and the derived remote wheel-move speed target use the inverted value when configured. Hardware/UART remote input behavior and related timeout/limit logic remain unchanged.
Changes:
- Apply
config->inputtilt_invert_throttletoremote_command_input()when storingremote->input. - Derive
remote->move_speedfromremote->input(instead of the rawvalue) to keep move-speed direction consistent with the stored command input.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // default to a limit of 5 km/h if limit of 0 is configured for the remote | ||
| float speed_max = config->remote.max_move_speed > 0 ? config->remote.max_move_speed : 5; | ||
| remote->move_speed = value * speed_max; | ||
| remote->move_speed = remote->input * speed_max; |
There was a problem hiding this comment.
Pretty sure this is as intended. You're changing behavior without any justification. I've made recent changes to this, unless I messed up (refer to the exact change if you look it up), it's been working like this for years and should stay the way it is.
There was a problem hiding this comment.
You’re right. d505d824 introduced the unified REMOTE command, and I missed that its value is already normalized app control rather than raw physical-remote input. The physical path has also intentionally applied inversion only to tilt—not wheel movement—since 344c458e. This PR changes both behaviors, so I’m closing it.
Apply configured throttle inversion to command-driven remote input before storing the normalized value and deriving the wheel-move speed target.
Hardware and UART remote input, timeouts, and speed limits are unchanged.
I was unsure if this is something we want but squinting at the code and UI settings made it seem like this is something people should be able to do with remotes.