From c68d4fdfcb03db4186d0212c791a75eee17bb308 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 1 Aug 2014 14:07:34 +0900 Subject: [PATCH] BaroGlitch: init members to resolve compiler warning --- libraries/AP_Baro/AP_Baro_Glitch.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Baro/AP_Baro_Glitch.cpp b/libraries/AP_Baro/AP_Baro_Glitch.cpp index ef8c5e6da7..995595ef69 100644 --- a/libraries/AP_Baro/AP_Baro_Glitch.cpp +++ b/libraries/AP_Baro/AP_Baro_Glitch.cpp @@ -42,9 +42,16 @@ const AP_Param::GroupInfo Baro_Glitch::var_info[] PROGMEM = { // constuctor Baro_Glitch::Baro_Glitch(AP_Baro &baro) : - _baro(baro) + _baro(baro), + _last_good_update(0), + _last_good_alt(0), + _last_good_vel(0.0f) { AP_Param::setup_object_defaults(this, var_info); + + // initialise flags + _flags.initialised = 0; + _flags.glitching = 0; } // check_alt - checks latest baro altitude against last know alt, velocity and maximum acceleration and updates glitching flag