mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-12 19:40:34 +08:00
sensors: switch position reading bug fixed
This commit is contained in:
@@ -1305,7 +1305,7 @@ Sensors::get_rc_switch_position(enum RC_CHANNELS_FUNCTION func)
|
||||
if (value > STICK_ON_OFF_LIMIT) {
|
||||
return SWITCH_POS_ON;
|
||||
|
||||
} else if (value < STICK_ON_OFF_LIMIT) {
|
||||
} else if (value < -STICK_ON_OFF_LIMIT) {
|
||||
return SWITCH_POS_OFF;
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user