EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.54k stars 330 forks source link

MT12 Pre-Start Check Switch-Warning: Switchpos not selectable #4444

Closed Tiefflieger68 closed 8 months ago

Tiefflieger68 commented 8 months ago

Is there an existing issue for this problem?

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

Radio MT12 Issue: Pre-Start Check Switch-Warning: it's not possible to select or disable Switchpos by short press enter key. Only by long press enter and auto detect switch pos.

Expected Behavior

select switch A (there is only switch A at MT12), short press enter to rotate pos up, midd, down and off. Works fine at X9 lite (etx 2.9.1)

Steps To Reproduce

open model menue SETUP (2) find "Pre-start Checks" and enhance submenue select S-Warning - nothing happens by short press enter

Version

Nightly (Please give date/commit below)

Transmitter

RadioMaster MT12

Operating System (OS)

No response

OS Version

2.10.0 nightly de0379c2 2023-12-20

Anything else?

No response

pfeerick commented 8 months ago

There are four switches on MT12 - A (3pos under wheel), B (behind the wheel at the top of the cavity, C (on the grip) and D (at the base at the back). If they are not all showing for you, something is wrong with your SYS -> HARDWARE -> switches configuration.

With a nightly from two days ago, I can use short press after selecting the switch warnings line to select any of the four switches and then short press to alter between required state (or ignore). Long press on the switch warnings line is also doing the auto detection.

I will check again later with current nightly just in case something changed though.

philmoz commented 8 months ago

SB, SC and SD are toggle switches so they should not be selectable in the pre-start checks.

pfeerick commented 8 months ago

Yeah, should have remembered that... did fix some of that up! Looks like the defaults need updating... Mt12 reset to 3pos for B-D with a new card. Which makes no sense as the hw_def is correct ... will have to reset it again to see wth is going on there 😕

OK, I can repo this when there is only one valid switch in the list.

pfeerick commented 8 months ago

The -1 appears to be the offender here, but that then also sets off the full line selection if it's just removed.

https://github.com/EdgeTX/edgetx/blob/6b1256db6651b5e80c93d28e0f1c84572d2f3cdd/radio/src/gui/128x64/model_setup.cpp#L317