Skip to content

Honor throttle inversion for command remote input#96

Closed
mjc wants to merge 1 commit into
lukash:mainfrom
mjc:refloat-fix-remote-inversion
Closed

Honor throttle inversion for command remote input#96
mjc wants to merge 1 commit into
lukash:mainfrom
mjc:refloat-fix-remote-inversion

Conversation

@mjc

@mjc mjc commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings July 15, 2026 17:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_throttle to remote_command_input() when storing remote->input.
  • Derive remote->move_speed from remote->input (instead of the raw value) 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.

Comment thread src/remote.c
// 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;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mjc mjc closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants