[PATCH] Disable arming capability via AUX switch

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

[PATCH] Disable arming capability via AUX switch

Post by Tommie »

Multiwii provides the capability to arm the copter using an AUX switch.
This poses a danger in low memory situations: Although the function itself is rarely used (everyone I know use the TX sticks to arm), flipping a single bit in the AUX matrix engages the engines - something that can happen accidently if memory is running low or while tinkering with the code.

Since arming can be disabled for the sticks, I added a #define to optionally remove the arming capability from the AUX switches as well; so if one doesn't use it, one can put an additional safeguard in place against accidental arming.
It also recovers a few bytes of flash memory :-)

Here is the comparison with the patches:
https://github.com/wertarbyte/multiwii- ... le_aux_arm

User avatar
treym
Posts: 258
Joined: Sat Jul 21, 2012 12:28 am

Re: [PATCH] Disable arming capability via AUX switch

Post by treym »

i think the #define should englobe the inflightCalibration #define

viewtopic.php?f=7&t=893

as discussed on irc , this will make the whole thing safer ,

@jevermeister : could you rework the inflightcalibration to match those safety requirements ?

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: [PATCH] Disable arming capability via AUX switch

Post by Tommie »

From reading the code, I think that inflight calibration is not affected by this changeset. Only the actual (dis)arming of the copter by using the AUX matrix is prohibited.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: [PATCH] Disable arming capability via AUX switch

Post by Alexinparis »

This poses a danger in low memory situations

This should not happen now.
Anyway, if it happens: the motor can start only if throttle is down, ie at their minimum throttle value.

This "patch" is useless for me.

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: [PATCH] Disable arming capability via AUX switch

Post by Tommie »

Alexinparis wrote:
This poses a danger in low memory situations

This should not happen now.

We had this discussion before. It should not happen, but it might happen.
I've just talked to someone who encountered random checkbox settings after flashing 2.1; in his case, it only affected the GPS row, but if it had been ARM, it might have been unpleasant. Since there is no real checksum or integrity check over the EEPROM content, this can (and obviously does) happen.
Anyway, if it happens: the motor can start only if throttle is down, ie at their minimum throttle value.

Even at idle speed, a copter spinning up spontaniously is not something I desire.
This "patch" is useless for me.

It might be useless for you, but not for others. And since one can disable arming via sticks, I don't see why this small change should pose a problem.

Post Reply