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
Stats is not being saved when Rate profile adjustments are set (latest Master) #10936
Comments
I was touching my goggles and noticed.... that it is an issue. Talon F7 V2 and Pyro F7 both FC will not keep the counter unless the BF adjustments is turned off. |
We should check For reference stats were added here: #7927 |
I tried Master from a month ago - the same result. |
Please someone check flashing other releases. Start with 4.2. If it works check 4.2.5. If it work's go up, if it doesn't go down. |
@haslinghuis i think you are right... Is it kind of a safety feature that prevents saving stats? |
Agree. But it's an expensive operation. So we just have to make sure the dirty flag is set. |
@haslinghuis this |
In that case it would be safe to remove the condition here but you have to check it. |
@haslinghuis as far as I understand this condition serves for 1 reason here. This scenario. Imagine no stats is set and:
At this point a user has an option - he can go ahead and save changes via OSD Now if we introduce stats without checking that condition, it will automatically save everything on disarm including new PIDs Rates etc. |
I have used this adjustments setup (see image below) for my 3-way position switch to change between rate profiles. It has been setup the same way for these versions of BetaFlight. BF 3.5.7, - BF 4.2.2 and now in development BF 4.3. Currently in BF 4.3 I added the pack counter in CLI and OSD. I tested it (plug in battery, arm, wait 5+ sec, disarm, check stats, counter value increased by 1, re-arm the quad --- repeat). The count value would increase by 1 each test cycle "IF" the battery remained plugged into my quad. "IF" you disconnect the battery and plug in again the pack counter will reset to zero. When the adjustments are removed the counter works properly. I found this video by Joshua Bardwell... In it he states to setup adjustments like so... (see image below). He also states something along the line that this is the NEW way to setup your adjustments to a switch at least moving forward from 4.1. I did set it up as seen below and tested again as stated above. The pack counter now works properly. I am only speculating, but it seems to me that if there was a change in the code, at some point where the code recognized the switch as a 3-position or 6-position, then it designated the function instead of it needing to be programmed by the user into their radio. If this is the case then by attempted to designate an adjustment for each switch position it is causing an internal conflict. |
@limonspb: This is a known limitation, and as such I'd classify this as 'by design', and as a 'fix' I think an update of the documentation around statistics is the right approach.
|
I agree with your statements, @mikeller . |
I just got hit with this bug. And as an fpv noob, I think this case must happen pretty often; Well, the stats are not saved indeed. What's weird to me is that on my other quads I could run It seems to me (still as an fpv newbee), that stats are not settings, they are just...stats. So saving them should not mean saving a configuration, isn't? Perhaps stats should be saved as 'stats data' separated from the configuration settings? |
@limonspb can we close this? |
pretty sure yes. |
Describe the bug
If Adjustments are set to change rate profiles on a switch, then stats (stats_total_flights) is not being saved on disarm and goes back to the previous value after the power cycle (4.3 branch)
To Reproduce
set stats_total_flights = 1
save
Expected behavior
stats_total_flights must become = 2
and it should stay = 2 even after the power cycle.
Flight controller configuration
diff_bug.txt
resource show all:
resource_show_all_bug.txt
Setup / Versions
All wired according to the diagram and performs/flies as expected except the stats not being saved.
The text was updated successfully, but these errors were encountered: