- Posts: 4403
Setting minimum voltage to write filesystem
- PhracturedBlue
-
Topic Author
- Offline
Less
More
14 Oct 2012 12:58 #2220
by PhracturedBlue
Setting minimum voltage to write filesystem was created by PhracturedBlue
As per discussion on RCGroups, I've implemented a voltage check to disable flash write once the voltage drops below a critical value. This is necessary because at some voltage, it is possible to erase, but not write the flash, resulting in a corrupted file-system.
My question is, does it make sense to have this be configurable in the GUI?
For now it is implemented on the configuration page (same place as battery alarm), but I'm not sure this should be easily exposed. It may make more sense for this to be a hidden switch in the tx.ini file that can only be changed via the PC.
Another thing I was considering is to save tx settings immediately after change, rather than waiting till shutdown. This way there would be less likelyhood of losing them. For various reasons, this is harder to do for the model info, though you can force it to save in various ways.
I'm open to opinions about this
My question is, does it make sense to have this be configurable in the GUI?
For now it is implemented on the configuration page (same place as battery alarm), but I'm not sure this should be easily exposed. It may make more sense for this to be a hidden switch in the tx.ini file that can only be changed via the PC.
Another thing I was considering is to save tx settings immediately after change, rather than waiting till shutdown. This way there would be less likelyhood of losing them. For various reasons, this is harder to do for the model info, though you can force it to save in various ways.
I'm open to opinions about this
- vlad_vy
-
- Offline
Less
More
- Posts: 3333
14 Oct 2012 13:29 - 14 Oct 2012 13:50 #2221
by vlad_vy
Replied by vlad_vy on topic Setting minimum voltage to write filesystem
I think that no need to expose a minimum voltage setting to users. Maybe place setting in tx.ini, but why to do it if this is the fixed value for Tx? Possible it will be better to warn user with periodical signal and flashing Tx voltage value. Also, at that case battery alarm cann't be lower then minimum voltage.
For my opinion, save Tx settings will be better at exit from menus, Tx Setting and Model Setting, if any changed.
For my opinion, save Tx settings will be better at exit from menus, Tx Setting and Model Setting, if any changed.
Last edit: 14 Oct 2012 13:50 by vlad_vy.
- vlad_vy
-
- Offline
Less
More
- Posts: 3333
14 Oct 2012 14:12 #2222
by vlad_vy
Replied by vlad_vy on topic Setting minimum voltage to write filesystem
I think about trimm setting, they changing outside menus.
- FDR
-
- Offline
14 Oct 2012 14:12 - 14 Oct 2012 14:13 #2223
by FDR
Replied by FDR on topic Setting minimum voltage to write filesystem
Yes, but you can fly a model without going back to the main screen, and nothing prevents you to even switch the tx off while being in the menu system...
Last edit: 14 Oct 2012 14:13 by FDR. Reason: typo
- vlad_vy
-
- Offline
Less
More
- Posts: 3333
14 Oct 2012 14:17 #2224
by vlad_vy
Replied by vlad_vy on topic Setting minimum voltage to write filesystem
Periodical check in changes and save once in 1-5 seconds.
- kcornels
-
- Offline
Less
More
- Posts: 15
14 Oct 2012 14:30 #2226
by kcornels
Replied by kcornels on topic Setting minimum voltage to write filesystem
since the batterie voltage does not drop instantly, you can safe the settings with reaching the critical voltage
- kcornels
-
- Offline
Less
More
- Posts: 15
14 Oct 2012 16:16 #2229
by kcornels
Replied by kcornels on topic Setting minimum voltage to write filesystem
I've tried to reproduce at which voltage the flash fails to write.
Unfortunately it was not reproduceable... .
The Devo8s has been powered from a regulated power supply and I've reduced the voltage step by step.
At first: The displayed voltage did not drop below 3,73 Volt, even if the power supply just delivers 2 V... . The display gets dark, but writing the flash still worked.
Unlike the batteries, the powersupply is capable to deliver 4A without a drop in voltage. Now I will try with batteries... .
Unfortunately here comes the same problem. The displayed voltage does not drow below 3.73 V. So I have no idea from which voltage writing the flash will fail... .
Unfortunately it was not reproduceable... .
The Devo8s has been powered from a regulated power supply and I've reduced the voltage step by step.
At first: The displayed voltage did not drop below 3,73 Volt, even if the power supply just delivers 2 V... . The display gets dark, but writing the flash still worked.
Unlike the batteries, the powersupply is capable to deliver 4A without a drop in voltage. Now I will try with batteries... .
Unfortunately here comes the same problem. The displayed voltage does not drow below 3.73 V. So I have no idea from which voltage writing the flash will fail... .
- PhracturedBlue
-
Topic Author
- Offline
Less
More
- Posts: 4403
14 Oct 2012 16:26 #2230
by PhracturedBlue
Replied by PhracturedBlue on topic Setting minimum voltage to write filesystem
It is actually trickier than that.
if the voltage is too low, then the flash won't erase, or write, so the filesystem won't be corrupted.
If the voltage is high enough everything works fine.
Interesting that the voltage stops reading at 3.7V. I'd have expected a value nearer to 3.0, but likely the adc is attahced in a way that prevents very low voltage readings. I'll need to experiment with it.
if the voltage is too low, then the flash won't erase, or write, so the filesystem won't be corrupted.
If the voltage is high enough everything works fine.
Interesting that the voltage stops reading at 3.7V. I'd have expected a value nearer to 3.0, but likely the adc is attahced in a way that prevents very low voltage readings. I'll need to experiment with it.
- vlad_vy
-
- Offline
Less
More
- Posts: 3333
14 Oct 2012 16:58 #2232
by vlad_vy
Replied by vlad_vy on topic Setting minimum voltage to write filesystem
To eliminate this problem you can write and read dummy file, if it's OK in that case write config files.
- vlad_vy
-
- Offline
Less
More
- Posts: 3333
15 Oct 2012 05:00 - 15 Oct 2012 05:15 #2237
by vlad_vy
Replied by vlad_vy on topic Setting minimum voltage to write filesystem
By the way, Battery Alarm starting from 3.30V is too low. NiMH battery starting from 1.1V/cell will discharge very quickly. Will be better start Battery Alarm from 4.00V with default value 4.30V.
Last edit: 15 Oct 2012 05:15 by vlad_vy.
- PhracturedBlue
-
Topic Author
- Offline
Less
More
- Posts: 4403
15 Oct 2012 05:54 #2239
by PhracturedBlue
Replied by PhracturedBlue on topic Setting minimum voltage to write filesystem
I set the default alarm at 4V (it was actually disabled previously...3.3 is just the minimum value allowed by the spinbox)
I created a critical level at 3.8V. It will save all settings and then lock the flash so that no further writes can happen. It will also pop up a dialog informing you of this.
Of course it has all only been tested in the simulator, but hopefully it will work as desired.
I created a critical level at 3.8V. It will save all settings and then lock the flash so that no further writes can happen. It will also pop up a dialog informing you of this.
Of course it has all only been tested in the simulator, but hopefully it will work as desired.
- rbe2012
-
- Offline
- So much to do, so little time...
Less
More
- Posts: 1433
15 Oct 2012 16:55 #2263
by rbe2012
Replied by rbe2012 on topic Setting minimum voltage to write filesystem
From my point of view:
- no need to make the min bat level configurable for user
- how about a button to save the settings in the main screen? I do many tests until I am satisfied and sometimes I prefer switching the tx off rather than pulling model*.ini-files from backup. A button would give me full control - maybe still better with a "do you want to save"-dialog when changing models or powering off the tx.
- suvsuv
-
- Offline
Less
More
- Posts: 268
16 Oct 2012 04:55 #2278
by suvsuv
Replied by suvsuv on topic Setting minimum voltage to write filesystem
In the stubs.c under the common_emu folder, the following line should be changed with larger value, e.g. 7500, to avoid showing a low batter warning when using emulator:
u16 PWR_ReadVoltage() { return (5500); }
u16 PWR_ReadVoltage() { return (5500); }
Time to create page: 0.600 seconds
-
Home
-
Forum
-
General
-
General Discussions
- Setting minimum voltage to write filesystem