From f8e70c6a67a2e1e9d5bc3b698061dbe4508dc02c Mon Sep 17 00:00:00 2001 From: Richard Li Date: Tue, 3 Dec 2024 14:42:57 +0800 Subject: [PATCH] SW2 and SW3 swapped --- radio/src/targets/pl18/nb4p_switch_driver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/targets/pl18/nb4p_switch_driver.cpp b/radio/src/targets/pl18/nb4p_switch_driver.cpp index a8d644b30..11677b97c 100644 --- a/radio/src/targets/pl18/nb4p_switch_driver.cpp +++ b/radio/src/targets/pl18/nb4p_switch_driver.cpp @@ -81,10 +81,10 @@ SwitchHwPos boardSwitchGetPosition(uint8_t cat, uint8_t idx) if (idx <= 1) { // uint16_t swVal = getAnalogValue(4); uint16_t swVal = getAnalogValue(5); - if (idx == 0 && (swVal < 512 || (swVal >= 1536 && swVal < 2560))) { + if (idx == 0 && (swVal >= 3584 || (swVal >= 1536 && swVal < 2560))) { return SWITCH_HW_DOWN; } - if (idx == 1 && (swVal >= 3584 || (swVal >= 1536 && swVal < 2560))) { + if (idx == 1 && (swVal < 512 || (swVal >= 1536 && swVal < 2560))) { return SWITCH_HW_DOWN; } } /*else if (idx <= 3) {