mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 00:35:14 +03:00
Fix #2787
This commit is contained in:
parent
3002c0a478
commit
34f7c3a463
2 changed files with 15 additions and 4 deletions
|
@ -1787,8 +1787,14 @@ class LogicalSwitchField: public TransformedField {
|
|||
switchesConversionTable->importValue(v2, csw.val2);
|
||||
}
|
||||
else if (csw.func >= LS_FN_EQUAL && csw.func <= LS_FN_ELESS) {
|
||||
sourcesConversionTable->importValue((uint8_t)v1, csw.val1);
|
||||
sourcesConversionTable->importValue((uint8_t)v2, csw.val2);
|
||||
if (IS_ARM(board)) {
|
||||
sourcesConversionTable->importValue((uint32_t)v1, csw.val1);
|
||||
sourcesConversionTable->importValue((uint32_t)v2, csw.val2);
|
||||
}
|
||||
else {
|
||||
sourcesConversionTable->importValue((uint8_t)v1, csw.val1);
|
||||
sourcesConversionTable->importValue((uint8_t)v2, csw.val2);
|
||||
}
|
||||
if (IS_TARANIS(board) && version < 216) {
|
||||
RawSource val1(csw.val1);
|
||||
if (val1.type == SOURCE_TYPE_STICK && val1.index < NUM_STICKS) {
|
||||
|
@ -1801,7 +1807,12 @@ class LogicalSwitchField: public TransformedField {
|
|||
}
|
||||
}
|
||||
else if (csw.func != LS_FN_OFF) {
|
||||
sourcesConversionTable->importValue((uint8_t)v1, csw.val1);
|
||||
if (IS_ARM(board)) {
|
||||
sourcesConversionTable->importValue((uint32_t)v1, csw.val1);
|
||||
}
|
||||
else {
|
||||
sourcesConversionTable->importValue((uint8_t)v1, csw.val1);
|
||||
}
|
||||
if (IS_TARANIS(board) && version < 216) {
|
||||
RawSource val1(csw.val1);
|
||||
if (val1.type == SOURCE_TYPE_STICK && val1.index < NUM_STICKS) {
|
||||
|
|
|
@ -276,7 +276,7 @@ bool getLogicalSwitch(uint8_t idx)
|
|||
}
|
||||
}
|
||||
else {
|
||||
uint8_t v1 = ls->v1;
|
||||
mixsrc_t v1 = ls->v1;
|
||||
#if defined(FRSKY)
|
||||
// Telemetry
|
||||
if (v1 >= MIXSRC_FIRST_TELEM) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue