I have a Radiomaster Pocket and found that it is very easy to accidentally actuate the SA button while removing it from the carrying bag or while bumping around on the end of a lanyard. This could lead to accidental arming of a drone which I would like to avoid.
Lucky for me, EdgeTX has some powerful programing tools built in, allowing for the arbitrary manipulation of inputs and outputs.
The first step was to change the Mix for CH5, normally assigned to SA, and assign it to Logical Switch L01. In our program L01 will be the Armed bit, if all the conditions for a safe arming are met it will be on.
Next was to build the actual logic of the arming sequence. I decided on the following order of operations.
* Move the throttle up past the value 50 (75% to the top)
* Move the throttle down to -100
* Click the latching button SA down
If any of those actions are done out of order or outside of a two second window the drone will not arm. This seemed like a reasonable compromise between ease of use and unlikeliness that it could occur by accident.
Below are the 8 logical switches that make up the program and a short description of each switch.
Next the throttle is pulled all the way down to near the value -100 (my throttle does not always makes it to -100 despite calibration), this switches on L05.
Finally SA is clicked on producing a 0.1s pulse from L04. Together the L04, L05, and L07 bits satisfy the conditions of the Arming Prerequisites L02.
With L02 on the Arming Latch L03 bit turns on. With the switch SA clicked on this satisfies L01 and switches Ch5 on, arming the drone. Clicking SA off will break the conditions of L01 allowing the drone to be disarmed with a single click.
In addition to the above, L06 and L08 are included to trigger audible indications of the state of the arming sequence.
If the Armed bit L01 is not active and throttle up/down motion has been preformed L08 will turn on. This indicates a correctly executed prearm sequence and triggers a prearm active notification.
If the button SA is on while the Armed switch L01 is not on this indicates that the prearm sequence was not done and SA should not be on. L06 checks for this and produces a 2.5s pulse with a 0.5s delay (a 3s cycle). This is used to trigger a repeating audible indication of 'Danger' notifying the user that the armed switch was erroneously pressed.
The Special Functions below show the audible indications for arming, disarming, prearming and accidental pressing of the SA switch.
L01 indicates that arming was successful
!L01 indicates that the radio has stopped sending the arm signal
L06 indicates that the arming sequence has failed and SA needs to be released
L08 indicates that the throttle motion was executed and the radio is ready to send the arm signal.
While there are many ways to create a prearming sequence this best matched my requirements of simplicity without using up the remaining SE button on my radio.