-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add flights counter to stats #10020
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
Add flights counter to stats #10020
Conversation
|
I think uint16_t would be plenty to be honest. That's enough for 1 flight a day for 179 years 🤣 |
|
I'm wondering if it needs better detection for incrementing the number of flights. Just relying on the arm/disarm action can provide false positives. |
stronnag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the PG Template version as you've added a field;
PG_REGISTER_WITH_RESET_TEMPLATE(statsConfig_t, statsConfig, PG_STATS_CONFIG, 1);
i.e. from 1 to 2
|
Any updates on this? |
Seems OK to me other than the minor formatting comment I made. |
OptimusTi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd increase this number to avoid false flights due to distance accumulation during armed workbench tests, if that makes sense.
Co-authored-by: OptimusTi <45466510+OptimusTi@users.noreply.github.com>
|
Any additional suggestions or requests on this? Style now is according to @breadoven request, min flight distance was changed to 30m |
|
Hey, how do we go forward with this? |
|
It sounds like all of the comments have been addressed. Has anyone other than the developer tested this? If not, can someone please do so? |
|
/review |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
I'm proposing a new field to be added to stats, flight counter, i.e. number of flights. I used an assumption that a flight counts once the craft is armed and disarmed and a certain time passes between the two (same as other fields); but only once per each battery pack. I also used uint32 for the field, which I feel is a bit excessive; for uint16 max number of flights would be 32768, I'm leaning on your judgement on that matter.