Browse Source

AP_GPS: prevent writing GPS log headings multiple times

master
Andrew Tridgell 11 years ago
parent
commit
5a7afbf2cd
  1. 4
      libraries/AP_GPS/AP_GPS_SBP.cpp
  2. 2
      libraries/AP_GPS/AP_GPS_SBP.h
  3. 2
      libraries/AP_GPS/AP_GPS_UBLOX.cpp
  4. 2
      libraries/AP_GPS/AP_GPS_UBLOX.h

4
libraries/AP_GPS/AP_GPS_SBP.cpp

@ -47,6 +47,7 @@ extern const AP_HAL::HAL& hal; @@ -47,6 +47,7 @@ extern const AP_HAL::HAL& hal;
#define SBP_HW_LOGGING 0
#endif
bool AP_GPS_SBP::logging_started = false;
AP_GPS_SBP::AP_GPS_SBP(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port) :
AP_GPS_Backend(_gps, _state, _port),
@ -57,8 +58,7 @@ AP_GPS_SBP::AP_GPS_SBP(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriv @@ -57,8 +58,7 @@ AP_GPS_SBP::AP_GPS_SBP(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriv
dops_msg_counter(0),
baseline_msg_counter(0),
crc_error_counter(0),
last_healthcheck_millis(0),
logging_started(false)
last_healthcheck_millis(0)
{
Debug("Initializing SBP Driver");

2
libraries/AP_GPS/AP_GPS_SBP.h

@ -216,7 +216,7 @@ private: @@ -216,7 +216,7 @@ private:
// ************************************************************************
// have we written the logging headers to DataFlash?
bool logging_started:1;
static bool logging_started;
void logging_write_headers();
void logging_log_health(float pos_msg_hz, float vel_msg_hz, float dops_msg_hz, float baseline_msg_hz, float crc_error_hz);

2
libraries/AP_GPS/AP_GPS_UBLOX.cpp

@ -44,6 +44,8 @@ extern const AP_HAL::HAL& hal; @@ -44,6 +44,8 @@ extern const AP_HAL::HAL& hal;
#define UBLOX_HW_LOGGING 0
#endif
bool AP_GPS_UBLOX::logging_started = false;
AP_GPS_UBLOX::AP_GPS_UBLOX(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port) :
AP_GPS_Backend(_gps, _state, _port),
_step(0),

2
libraries/AP_GPS/AP_GPS_UBLOX.h

@ -254,7 +254,7 @@ private: @@ -254,7 +254,7 @@ private:
bool need_rate_update:1;
// have we written the logging headers to DataFlash?
bool logging_started:1;
static bool logging_started;
uint8_t _disable_counter;

Loading…
Cancel
Save