-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Adds optional arming method and provides contiguous proportional channels for all full-res modes #3008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ing (legacy) and SF Arm arming (new)
…ing. If SF Arm is not defined system will use ch5 logic for arming.
…annel 5 / arm (just like 16ch/2 mode) This allows message based arming without re-mapping and provides a more convenient default (8, 12, 16 proportional channels) for PWM users.
…onsumers. include OTA.h to access bool isArmed
…and arming command message. This ensures the arming status is sent periodically and at the same rate as channel 5.
…annels packet adds extra byte to the RC channels message in arming mode Function: - frame len 24 -> arming mode Channel: use channel 5 - frame len 25 -> arming mode Function: use commanded arming status in extra byte
|
Wouldn't it be much easier to allow to setup bind channel per model ? ie it may default to 5, but you could change it to say 15 using elrs config script ? This way you could easily align elrs arm and BF arm for example |
This was of course the first idea but after a closer look this is not the best of all concepts. There are a number of reasons why this is not a solution. One obvious reason is it's still wasting one channel. What we truly were after was the separation of arming from RC channels as an add on option to the classic channel 5 based arming. Message based arming allows using up to all 16 channels for PWM outputs and serial data streams like SBUS. Other reasons are more subtle and buried in the way the OTA protocol works. |
|
I think the main problem is that we have conflated ARM (on the vehicle) with "activate" on the transmitter module/receiver where "activation" does a few things like enabling the Dynamic Power algorithm and on the receiver, sending the ARM command to the DJI Air Unit, and potentially other things. |
|
But this PR would mean that for a simple drone, user would have to configure a channel for arming BF, and an SF to activate ELRS. Doesn't sound like progress to me ? And for fixed wings, users would need to add an always ON mysterious SF so they can use CH5 normally. I'm all for fixing the ch5 issue, I just think that's going to confuse users even more |
No, the default setting for Arming is "Channel mode" and it stands for "use RC Channel 5 based arming" unchanged to the way you do it now. For a simple drone you'd do exactly the same as you do today. Define your CH5 mixer with a switch attached to set channel 5 to 1000/2000us and that's it Leave arming mode to its default Channel mode. No SF needs to be defined.
I don't know what you mean by always ON. To use channel 5 as a regular proportional channel in the full-res modes but still be able to control arming you'd set arming mode to Function, define a SF Arm, define your trigger (e.g. physical switch) and enable it. Arming is now separated from Channel 5 and done via the switch you defined as trigger. No channel lost for RC control, No re-mapping required (which is really confusing for most users). |
The way I understand it, for flight controllers everything stays as is - arming mode is channel, and channel 5 is used for arming. No SF required. For fixed wing indeed most people may just define an always on SF. So maybe a 3rd arming mode, "always" may be useful? But this will right now block changing stuff in the LUA...tricky! |
|
So we arrive to the same conclusion, fixed wings pilots will have to do for each model an always on ARM SF (meaning trigger for the SF is ON in Etx) to free ch5 use. I’m sorry, but as a fixed wing pilot, that’s everything but logical or even simple to understand. Since I don’t fly drones, are drones pilots expected to use this SF, or is it only for fixed wings/cars pilots? Also, keeping arming name is wrong since it has nothing to do with arming craft? I would much prefer something like: |
|
You need to understand the concept of"optional add-on". No one has to use it, you can use it if you want to benefit from it. The clear benefit of arming mode Function is to free up channel 5 for RC control while still being able to control the armed state. I also feel you need to understand the difference between arming the TX module (disable/enable certain TX module features) and why this is important (e.g. dynamic power) and arming a drone (spooling up the motors). Read @pkendall64's comment above again. And I also think you misunderstand the purpose of the Arming: Channel/Function setting. This setting tells the system which arming method to use. RC Channel 5 based or SF Arm based. It does not deal with the armed state itself. This is done depending on the mode chosen. Either via the value of RC channel 5 or the state of SF Arm. If like what I suspect your fixed wing setup doesn't care about arming and wants to have the system permanently in the armed state (which is valid but not recommended) you can do this by setting the SF Arm trigger to ON. I personally set the trigger to a logical switch representing some sort of on-gorund/in-flight status (gear in, altitude > 20m, tow hitch closed, heli idle up on, ...) but you can also set the SF to permanently ON if you want. To answer your question: Drone pilots with existing setups: don't need to change anything Drone pilots doing new setups: can still do it using the Channel 5 mixer setup like they'd do today. They could choose to use arming mode Function and control arming via SF Arm (no Channel 5 mixer required) . It'll work fine, but there's no real benefit in doing so. Fixed wing setup: You can do two things. This PR btw solves the problem many SBUS users have. Re-mapping channels on the receiver (e.g. via WebUI) doesn't change the channel order in the SBUS stream meaning users of older FCs and FBL expecting a certain channel order won't work with ELRS. |
|
AFAIK lua allows to pickup any input, not just channels therefore all this logic can be kept in lua without touching edgetx. |
|
So if this is all about enabling the Dynamic Power algorithm, isn't the logic reversed, and could be fixed as part of this change ? If I understand correctly, fix wing pilots HAVE to proactively "arm the tx" for flying, you need to do something specific to your model (either fix ch5 value or use the SF) vs any other system to simply fly safely. That makes little sense to me as a fixed wing pilot. I think it would be much much easier to understand if it worked the other way around, where you have to activate a SF if you want to "reduce" your transmitter power, kinda "pit mode" thing, otherwise, if nothing it done, it works "nominally/safely" |
|
It's more than just enabling Dynamic Power. Theres other things as well that the TX module does. It's also not just fixed-wing pilots that have to "arm" the module, it's all pilots. It just happens that multirotor pilots need an arm and it's nice to share the TX "arm" and the multirotor arm. |
|
It's all great, but all this assumes users know they need to "arm the TX" which most absolutely don't. You use companion or radio wizard to create the model, you get a model from a friend not using elrs, basically almost every scenario, you check it thoroughly, go flight it, bang your doomed. |
|
Well, that is really a failing on the users part then, isn't it? As this has always been a part of ELRS, and has always been explained the quick start guides, videos, etc. Any radio system has idiosyncrasies... i.e. I could easily pick on Spektrum, which had a rigid TAER order, because the first channel would always go to 988us (or thereabouts) on failsafe... as well as no (not zero, no) output on the throttle channel while the receiver was booting up and looking for the TX - so was not suitable for use with some stabilisers, ESCs and use cases. It is really up to the end user to learn the specifics of the system they are using before doing stuff with it, especially if they are using models given to them by someone else, as there is bound to be something that needs to be changed when changing RF systems. I get that the ch5/arm requirement is something ... unique?... to ELRS (which, IMO, at the end of the day is a good thing, as why bother having different RF links if they are all the same? Dare I say bring back the reed sets? 🤣 )... but we should not be aiding and encouraging ignorance and incompetence - there is enough of that in the hobby already, and IMO it is dragging it down, not lifting it up. But more importantly, will the craft still fly/operate if not "armed"? Sure will. Will it fly as far? Nope. Will that in most cases be further than BVLOS (which is illegal in most jurisdictions around the world without specific accreditation and training)? Yes. Will the transmitter tell the operator to stop being an idiot, and not fly out RF range? Probably will. Will they listen? Probably not... but they'll still blame the transmitter 🙃 I'mma gonna butt out now... I've had my 2c rant for this PR 🤭 |
Thanks for your replies. I think your $100 rant was more about @3djc's fundamental discussion which had no place here in the first place. Let's move on. |
If you want to continue voicing your concerns about the general ExpressLRS arming concept you're welcome to do so. Please open a new discussion in https://github.com/ExpressLRS/ExpressLRS/discussions. Good ideas are always welcome. |
|
Tested almost everything I could think of, colorlcd, b&w, fullres, regular, with and without CH5 mixes, all good |
CapnBry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple minor things in the wrong place.
|
Does the RX also output the new, extended RC_CHANNELS format on the crsf-serial-output to signal the dis/arm state to other devices (FC)? If not, it would be best to make that a configurable option on the receiver side. If no RC channel is used to signal the dis/arm state, how then? |

Problem:
Arming is a concept ELRS uses to control the performance and safety of the radio control link. Traditionally AUX1, i.e. RC channel 5 is used to switch the ELRS system between the armed/disarmed state. For more info on arming see why arming
The dual use of RC channel 5 as RC channel and also controlling the armed states is a major source of confusion for users setting up traditional RC models without flight controllers. PWM Channel 5 output on PWM receivers cannot be used for regular model setups together with the required arming/disarming of the ELRS system. There are workarounds (re-mapping of the RC channel 5 receiver output to use a different RC input channel than channel 5) but they are far from easy to understand especially for beginners.
Channel 5 is output as digital channel (1000us/2000us) representing the armed state in full-res modes 8ch and 12ch/mixed. This makes Channel 5 unusable as regular proportional channel unless re-mapped with another channel. This is in contrast to the full-res mode 16ch/2 where channel 5 is output as full proportional channel (while the system is still listening to channel 5 to determine the armed state).
Solution:
This PR adds a CRSF message based arming mode to V4 firmware that separates RC channels and arming. This allows to use RC channel 5 as a regular proportional channel in all full res switch modes (8ch, 12ch, 16ch/2 rate) and serial protocols like SBUS with no re-mapping required while still being able to control the armed/disarmed states independently. The CRSF message based arming mode can be used as an alternative to RC channel 5 arming. The system default will still be channel 5 arming.
For UI purposes channel 5 based arming will further be called Arming mode CH5, the CRSF message based arming will be called Arming mode Switch.
In order to use Arming mode Switch the handset must communicate the requested armed state using the extended CRSF RC Channels message. To accomplish this a complementary PR for EdgeTX was designed, see EdgeTX PR #5641. The EdgeTX PR extends the Internal/External RF settings to allow switching Arming modes and in case of Arming mode Switch it allows to set any physical switch, logical switch or other sources to command the armed state. Having a model setup with Arming mode set to Switch allows the use of channel 5 exclusively for RC control and without remapping whilst controlling the armed/disarmed states separately by the defined Switch.
Backwards compatibility is maintained by the fact that Arming mode CH5 is the default. If a handset is used that is not capable of sending the extended CRSF RC channel 5 message Arming mode CH5 will be used as it is the default.
The 8ch and 12ch mixed full-res modes are changed to provide a full proportional channel 5 with 8 channel and 12 channel contiguous channel output just like ch16/2 mode already does.
This updates the Switch-Configuration-Modes to the following table (changes in yellow):
Setting up arming mode Switch with EdgeTX:
Change the Arming mode to Switch in the Internal or External RF settings
Define a Switch (logical, physical or any other suitable source)
Set the commanded armed state (armed/disarmed) by activating/deactivating the defined Switch (physical switch SE in above example)
Demo:
The video shows a RadioMaster ER6 configured for SBUS output on 100Hz (full-res) and 12ch/mixed mode. One servo connected to PWM output 5 (EdgeTX mixer channel 5 controlled by Pot S1) and one servo connected to channel 5 of an SBUS converter connected to the ER6 serial interface. This demonstrates: