Commit Graph

19 Commits

Author SHA1 Message Date
Dr.-Ing. Amilcar Do Carmo Lucas 4996c17a75 AP_Stats: Only reset statistics if the user explicitly sets AP_Stats_RESET parameter to zero.
This allows users to load parameter files (in MP, MAVProxy or any other GCS) without
accidentally reseting the statistics, because the AP_STATS_RESET value contained in
the parameter file will be ignored (unless it is zero and it is usually not zero).
The other statistics parameters are read-only, and the GCS should be clever enough to not set those.
2024-02-21 18:28:23 +11:00
bugobliterator 4b61b3d64e AP_Stats: initialise parameter defaults 2023-11-22 21:43:00 -08:00
Peter Barker 23f5fcffb2 AP_Stats: add and use an AP_RTC_config.h 2023-10-11 19:17:27 +11:00
Patrick José Pereira e146483e72 AP_Stats: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Andrew Tridgell e7f200f623 AP_Stats: make all semaphores recursive
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Andrew Tridgell 0dd6415052 AP_Stats: added semaphore to flttime update
fixes #12948
2019-12-03 21:04:48 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas 3bea6229ad AP_Stats: Improve reset documentation (NFC) 2019-02-28 09:20:10 +09:00
Andrew Tridgell a0ce604721 AP_Stats: make singleton and add flighttime accessor 2018-08-16 12:00:50 +10:00
Andrew Tridgell f0fba01138 AP_Stats: use set_and_save_ifchanged()
if the board has no GPS then the values usually don't change
2018-08-06 21:46:06 +10:00
Peter Barker 973fe57827 AP_Stats: use AP_RTC 2018-06-15 08:01:22 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas ca72f4d283 AC_Stats: NFC Statistics are read-only variables 2017-06-07 19:53:09 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas c417376ba8 AP_Stats: Use SI units conventions in parameter units
Follow the rules from:
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
one further constrain is that only printable (7bit) ASCII characters are allowed
2017-05-17 18:07:25 +10:00
Dr.-Ing. Amilcar Do Carmo Lucas 363574244b AP_Stats: Add missing parameter units 2017-01-16 19:07:27 +00:00
Peter Barker 37c2c0a822 AP_Stats: fix variable reset time bug
Use Jan 1st 2016 as epoch time rather than Unix epoch.

PixHawk's 32-bit floats can't store a 32-bit timestamp.
2016-11-16 09:14:01 +09:00
Peter Barker 1bd96ae558 AP_Stats: ability to reset statistics 2016-10-29 14:53:25 +09:00
Peter Barker e6adbceb3e AP_Stats: runtime 2016-10-29 14:53:25 +09:00
Peter Barker 77064852c4 AP_Stats: AP_Stats flighttime 2016-10-29 14:53:25 +09:00
Peter Barker be13de79a4 AP_Stats: a periodic update function, flttime and runtime 2016-10-29 14:53:25 +09:00
Peter Barker 7eff99b053 AP_Stats: keeps track of vehicle usage statistics 2016-10-29 14:53:25 +09:00