From 67690553c595cea429c52bf6a3f2cdf495a9b8bd Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Sun, 9 Nov 2014 13:27:24 -0800 Subject: [PATCH] BaroGlitch: add reset method --- libraries/AP_Baro/AP_Baro_Glitch.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_Baro/AP_Baro_Glitch.h b/libraries/AP_Baro/AP_Baro_Glitch.h index 48520b53b1..9673fab449 100644 --- a/libraries/AP_Baro/AP_Baro_Glitch.h +++ b/libraries/AP_Baro/AP_Baro_Glitch.h @@ -36,6 +36,10 @@ public: // glitching - returns true if we are experiencing a glitch bool glitching() const { return _flags.glitching; } + // reset - resets glitch detection to start from current baro alt + // should be called after barometer altitude is reset during arming + void reset() { _flags.initialised = false; } + // last_good_update - returns system time of the last good update uint32_t last_good_update() const { return _last_good_update; }