mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 23:43:34 +08:00
boards: new ARK FPV FC (#23830)
* add new payload power switch (RC_MAP_PAY_SW)
This commit is contained in:
@@ -271,6 +271,19 @@ void ManualControl::processSwitches(hrt_abstime &now)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(PAYLOAD_POWER_EN)
|
||||
|
||||
if (switches.payload_power_switch != _previous_switches.payload_power_switch) {
|
||||
if (switches.payload_power_switch == manual_control_switches_s::SWITCH_POS_ON) {
|
||||
PAYLOAD_POWER_EN(true);
|
||||
|
||||
} else if (switches.payload_power_switch == manual_control_switches_s::SWITCH_POS_OFF) {
|
||||
PAYLOAD_POWER_EN(false);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PAYLOAD_POWER_EN
|
||||
|
||||
} else if (!_armed) {
|
||||
// Directly initialize mode using RC switch but only before arming
|
||||
evaluateModeSlot(switches.mode_slot);
|
||||
|
||||
Reference in New Issue
Block a user