feat(radio): allow state of Sticky LS to persist across reboot or EM.
Persistence across EM is useful when recovering model state.
Not sure whether persistence on reboot is a good idea or not - opinions?
Persistence on EM makes a lot of sense, but I believe not at all on reboot imho.
On EM, definitely. Across reboot... only as an option. There are times where the LS being able to remember it's state (just like with customisable switches) would be advantageous.
Could you describe such a scenario?
For the same reason as with customisable switches... when using momentary switches as 2POS, and remembering the state across reboots.
That works for customizable switches because they have a led to indicate the state. Bad idea for LS I think
Even as an option, rather than the default? :thinking: So what happens when I use a SF to adjust a GV to get that persistence? Is that not dangerous also (with more steps, and loss of both SFs and GVs in the process).
I've added an option flag so users can decide if a Sticky LS should persist across reboots.
Is it at all feasible to add an option like this to the actual LS menu? With all the other options? So you can choose for individual STKY actions. Just throwing that out there (or maybe that’s what this is about and I just can’t interpret the code changed 😂)
LGTM on TX16S and TX12, and read/write to TX12 with companion fine. Simulator for X9D+2019 looks good also...
Is it at all feasible to add an option like this to the actual LS menu? With all the other options? So you can choose for individual STKY actions. Just throwing that out there (or maybe that’s what this is about and I just can’t interpret the code changed 😂)
Not quite sure what you mean... this adds this as an option to all sticky functions... i.e. you have the option to make the state persistent across reboots.
Not quite sure what you mean... this adds this as an option to all sticky functions... i.e. you have the option to make the state persistent across reboots.
After testing it on my radio, I now realize that that was the whole purpose, but I just didn't pay enough attention to the new code 😂
@philmoz The Persist option does not seem to work on my MT12. I have an LS set to persist, and after a reboot it ignores the persistence function. One other bizarre thing is that both positions trigger a sound file to play (via SF), but it just plays both of them in an row after a reboot regardless of which position I left it in. (which is not at all helpful).
Works fine for me. Are you sure that the logic for the LS is not causing it to be reset after boot up?
I also can't reproduce this. A Sticky LS (LS1), triggered by SC down, and marked as persistent, is correctly saving it's states for me on MT12 with current nightly. And two SFs, one triggered by LS1, and the other !LS1, is correctly only being triggered by the active state on radio boot.
Okay, I found the issue. I had V1 and V2 set to SB^ (which is always active except when pressed) so I think when the radio restarted it would confuse the LS and it would toggle back on. Once I switched it to only be active when pressed down, all issues vanished. I really should have tried that before commenting 🤣 😂
thanks guys!