Reorganise stats screens
This started as a basic re-organisation of the stats screens. But kinda grew a little. The main result is still a slightly more organised stats screen. But it adds a few more stats. Also, where things are now separated, it will be easier to make stats customisable.
Here's an example of the stats screen in Avatar (HITL) from 2 sequential flights.
Here are examples of the analogue stats screen. Note, that I have updated the AVG EFFICIENCY F/T to fit.
Bug Fixes
Not all stats were resetting on arm. As these are flight stats, this should be the case. I have gone through and made sure that all stats now reset when armed. But, not reset after an in-flight re-arm. The exception is the energy used from the battery. It is understandable that this stat would be useful if it were persistent. So both are shown. Total from when the battery was plugged in and the amount since arming.
New data on the stats screen
- Min Volts now shows both pack and cell voltage
- Used energy now shows total and flight use
- Average efficiency also shows total and flight energy efficiency
- Min and Max satellites
- Min and Max ESC temperature
- If using a non-metric OSD. The metric efficiency can be shown by enabling
set osd_stats_show_metric_efficiency = on - Blackbox file number
Other things of note
-
osd_stats_min_voltage_unithas been removed, as both battery and cell voltages are shown now - Some stats titles have been subtly renamed, to make them easier to understand and fit better on screen:
- Fly Time -> Flight Time
- Traveled (sp) Distance -> Flight Distance
- Max Distance -> Distance from home
- Min Battery Volt -> Min Volts Pack/Cell
- Used Capacity -> Used Energy Flight/Total
- The headers and setting save status messages are now centred
Requires Configurator https://github.com/iNavFlight/inav-configurator/pull/1941
Very nice update. I see the blackbox filename is available too - very useful.
Is the proposal to encode part of the model name in the blackbox filename deferred for a later update?
Seems there is a discrepancy in compilers. The build is failing with
Yet my compiler thinks it should be a long
So which is correct. Should an int32_t be a long integer or integer.
EDIT
Looks like the non-MAC build routines also think it should be a long, not an int??
@stronnag @DzikuVx any ideas?
Just a comment ... I really don't like copying
buffonto itself, when instead one could:tfp_sprintf(buff+strlen(buff), " %c%05" PRId32 " ", SYM_BLACKBOX, logNumber);Couldn't you? For the same effect.
Done. I found a few other occurrences throughout the OSD.c file.
@MrD-RC We can't push it to 7.1. The change in osd_stats_min_voltage_unit is a breaking change comparing to 7.0.
@MrD-RC We can't push it to 7.1. The change in
osd_stats_min_voltage_unitis a breaking change comparing to7.0.
I was wondering about that. But, I figured that both options for osd_stats_min_voltage_unit are now displayed. It wasn’t so much of an issue. But yes, it will cause an error in the diff.
Then agreed. @MrD-RC please resolve conflicts and let's merge to master waiting for INAV 8
Very nice update. I see the blackbox filename is available too - very useful. Is the proposal to encode part of the model name in the blackbox filename deferred for a later update?
I'll change that separately.
Now with added
stats
I guess also missed to be merged and got a few new conflicts @DzikuVx
I guess also missed to be merged and got a few new conflicts @DzikuVx
I’ve been holding off merging until 7.1 comes out and those changes are merged with master.
I need to test in flight on an MSP DisplayPort platform and disarm in flight. If that all goes ok, this will be good to merge.
Tested in flight with MSP DisplayPort. It worked as expected.