Skip to content

Commit

Permalink
AP_Stats: Ignore fraudulent posts
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura committed Sep 28, 2021
1 parent e911560 commit 8df0410
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_Stats/AP_Stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ AP_Stats::AP_Stats(void)

void AP_Stats::copy_variables_from_parameters()
{
bootcount = params.bootcount;
flttime = params.flttime;
runtime = params.runtime;
reset = params.reset;
Expand All @@ -69,6 +70,7 @@ void AP_Stats::init()

void AP_Stats::flush()
{
params.bootcount.set_and_save_ifchanged(bootcount);
params.flttime.set_and_save_ifchanged(flttime);
params.runtime.set_and_save_ifchanged(runtime);
}
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_Stats/AP_Stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class AP_Stats
// these variables are periodically written into the actual
// parameters. If you add a variable here, make sure to update
// init() to set initial values from the parameters!
uint32_t bootcount; // total boot count
uint32_t flttime; // seconds in flight (or driving)
uint32_t runtime; // total wallclock time spent running ArduPilot (seconds)
uint32_t reset; // last time AP_Stats parameters were reset (in seconds since AP_Stats Jan 1st 2016)
Expand Down

0 comments on commit 8df0410

Please sign in to comment.