Browse Source

AP_GPS: remove pointless initialisers

master
Peter Barker 7 years ago committed by Peter Barker
parent
commit
2aa0de49bb
  1. 6
      libraries/AP_GPS/AP_GPS_ERB.cpp
  2. 5
      libraries/AP_GPS/AP_GPS_ERB.h
  3. 4
      libraries/AP_GPS/AP_GPS_MTK.cpp
  4. 7
      libraries/AP_GPS/AP_GPS_NMEA.cpp
  5. 3
      libraries/AP_GPS/AP_GPS_NMEA.h

6
libraries/AP_GPS/AP_GPS_ERB.cpp

@ -32,12 +32,6 @@ extern const AP_HAL::HAL& hal; @@ -32,12 +32,6 @@ extern const AP_HAL::HAL& hal;
# define Debug(fmt, args ...)
#endif
AP_GPS_ERB::AP_GPS_ERB(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port) :
AP_GPS_Backend(_gps, _state, _port),
next_fix(AP_GPS::NO_FIX)
{
}
// Process bytes available from the stream
//
// The stream is assumed to contain only messages we recognise. If it

5
libraries/AP_GPS/AP_GPS_ERB.h

@ -27,7 +27,8 @@ @@ -27,7 +27,8 @@
class AP_GPS_ERB : public AP_GPS_Backend
{
public:
AP_GPS_ERB(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port);
using AP_GPS_Backend::AP_GPS_Backend;
// Methods
bool read() override;
@ -150,5 +151,5 @@ private: @@ -150,5 +151,5 @@ private:
bool _parse_gps();
// used to update fix between status and position packets
AP_GPS::GPS_Status next_fix;
AP_GPS::GPS_Status next_fix = AP_GPS::NO_FIX;
};

4
libraries/AP_GPS/AP_GPS_MTK.cpp

@ -28,9 +28,7 @@ @@ -28,9 +28,7 @@
const char AP_GPS_MTK::_initialisation_blob[] = MTK_OUTPUT_5HZ SBAS_ON WAAS_ON MTK_NAVTHRES_OFF;
AP_GPS_MTK::AP_GPS_MTK(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port) :
AP_GPS_Backend(_gps, _state, _port),
_step(0),
_payload_counter(0)
AP_GPS_Backend(_gps, _state, _port)
{
gps.send_blob_start(state.instance, _initialisation_blob, sizeof(_initialisation_blob));
}

7
libraries/AP_GPS/AP_GPS_NMEA.cpp

@ -50,13 +50,6 @@ extern const AP_HAL::HAL& hal; @@ -50,13 +50,6 @@ extern const AP_HAL::HAL& hal;
#define DIGIT_TO_VAL(_x) (_x - '0')
#define hexdigit(x) ((x)>9?'A'+((x)-10):'0'+(x))
AP_GPS_NMEA::AP_GPS_NMEA(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port) :
AP_GPS_Backend(_gps, _state, _port)
{
// this guarantees that _term is always null terminated
memset(_term, 0, sizeof(_term));
}
bool AP_GPS_NMEA::read(void)
{
int16_t numc;

3
libraries/AP_GPS/AP_GPS_NMEA.h

@ -53,7 +53,8 @@ class AP_GPS_NMEA : public AP_GPS_Backend @@ -53,7 +53,8 @@ class AP_GPS_NMEA : public AP_GPS_Backend
friend class AP_GPS_NMEA_Test;
public:
AP_GPS_NMEA(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port);
using AP_GPS_Backend::AP_GPS_Backend;
/// Checks the serial receive buffer for characters,
/// attempts to parse NMEA data and updates internal state

Loading…
Cancel
Save