Inav: Arming failure when killswitch is set on alternate position of remote controller arm switch

Created on 10 Jun 2019  路  2Comments  路  Source: iNavFlight/inav

Current Behavior

Set a two-position switch so that the LOW position is mode KILLSWITCH and the HIGH position is mode ARM. Transition to mode ARM. The system will fail to arm, and will display a generic error messages on the OSD:

UNABLE TO ARM
DISABLE ARM SWITCH FIRST

Expected behavior

The device would either arm, or provide a succinct message indicating why it failed to arm.

Version:

INAV/MATEKF722 2.2.0 Jun 3 2019 / 14:05:06 (f59251378)

GCC-7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]

BUG

All 2 comments

Issue-Label Bot is automatically applying the label BUG to this issue, with a confidence of 0.94. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Such setup doesn't make much sense, but this is what happens:

  1. Arming switch is off, killswitch is on
  2. Arming switch is on, killswitch is off

    • Arm blocking code checks arming switch first and since at this point killswitch is not cleared yet, sets the DISABLE ARM SWITCH FIRST blocker.

    • Arm blocking code disables killswitch blocker, but at this point arming is already blocked

The linked PR changes the order to make sure all other blockers are checked before the arming switch to avoid this.

Was this page helpful?
0 / 5 - 0 ratings