Settings do not get saved over a reboot (Internal TX setting, dead zone setting) on 2.7.1 on a NV14
Is there an existing issue for this problem?
- [X] I have searched the existing issues
- It is vaguely similar to #2130 but in my case just the settings from the hardware tab get reset to default - no models are deleted.
What part of EdgeTX is the focus of this bug?
Transmitter firmware
Current Behavior
I usually set the internal TX function to off while using the simulator and also I set the deadzone to 0 (from 4). These settings get reverted (TX to ON, deadzone to 4) on reboot / restart of the Nirvana NV14 on EdgeTX 2.7.1
Expected Behavior
I would expect those settings to remain saved over a reboot / restart.
Steps To Reproduce
- Go to to: Radio Settings --> Hardware tab
- Set "Internal RF / internal module" to OFF, set deadzone (under 'sticks') to 0
- Switch the radio off and on again.
- Go back to the Hardware tab, settings are reverted to their default states.
Version
2.7.1
Transmitter
FlySky NV14
Anything else?
No response
I can reproduce this on latest nightly... a0770beb5f8616e2f14f2828de12b3ff8b1f3397. The dead stick value not saving is specific to 0 - i.e. if it is set to other values, like 2, it is saved. So both are most likely related to a 0 value.
ok, this is the offending code... and I know why we have it this way... it is so that if there is no value at all, the defaults are applied... but the issue is there is no difference between no value, and 0 !!!
https://github.com/EdgeTX/edgetx/blob/a0770beb5f8616e2f14f2828de12b3ff8b1f3397/radio/src/storage/storage_common.cpp#L97-L106
btw, for simulator, why not a separate model with the internal RF off? Then you can have all your mixes/switches and stuff all configured for simulator as well.
Ah, thanks for looking into it, fingers crossed for an easy fix! Re simulator: I have a few simulator profiles now (one for Liftoff, one for DCL and one for Elite) but I didn't know if the Internal RF setting in the radio settings gets overwritten by the model settings or not (which I suppose it does according to your comment?).
There are two different parts to this... there is the "what type is the internal module" setting (which is what you are changing in the hardware setttings, and is getting reset to the firmware default if 'OFF'), and there "is the internal module enabled or disabled" setting, which is what is in the model settings. In other words, if you turn it off in the model settings, it is off, because the type of internal module is of no importance at that point.
Hi, updated to the latest official Firmware (2.8.0), the problem with the stick deadzone settings not getting saved (specifically setting it to '0', which is what I use) over a reboot still remains. Could the issue be reopened or should I open a new one? Regards, Tekikai PS: or making the settings model specific?
What does it do - by any chance does it revert back to something like 2?
@philmoz didn't you fix this?
No I didn't do anything to fix this.
I would suggest simply removing the code that overwrites the dead zone in the postRadioSettingsLoad function. The dead zone is set to the default value when the radio.yml file is first created (generalDefaults function) - if the user sets the value to 0 we should not be updating it after loading the radio.yml settings.