ExpressLRS / Handset

Handset Development
GNU General Public License v3.0
31 stars 7 forks source link

Fix switches not updating #5

Closed JBKingdon closed 3 years ago

JBKingdon commented 3 years ago

When running in compatibility mode, the new switch encoding requires the switch values to be mapped from the 0,1,2 values in currentSwitches to the new elrs values where 7 represents the middle value. There was a bug where the new value was then stored as having been sent, but since this didn't match the value in currentSwitches the getNextSwitch() function kept returning the same switch to be sent again, blocking any higher numbered aux from being sent. The code was changed to record the un-mapped value as having been sent.

Fixes https://github.com/ExpressLRS/Handset/issues/4