mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 13:40:36 +08:00
Commander: only initialize to tablet mode and don't switch back on RC loss
This commit is contained in:
committed by
Julian Oes
parent
002579b3e0
commit
400e1f8214
@@ -2684,7 +2684,7 @@ Commander::run()
|
||||
* just a tablet. Since the RC will force its mode switch setting on connecting
|
||||
* we can as well just wait in a hold mode which enables tablet control.
|
||||
*/
|
||||
if (_vehicle_status.rc_signal_lost && (_commander_state.main_state == commander_state_s::MAIN_STATE_MANUAL)
|
||||
if (_vehicle_status.rc_signal_lost && (_commander_state.main_state_changes == 0)
|
||||
&& _vehicle_status_flags.global_position_valid) {
|
||||
|
||||
main_state_transition(_vehicle_status, commander_state_s::MAIN_STATE_AUTO_LOITER, _vehicle_status_flags,
|
||||
|
||||
Reference in New Issue
Block a user