more cppcheck warnings fixes

This commit is contained in:
Mike Kinney
2022-01-24 17:24:40 +00:00
parent be0b9979bc
commit caaa235c5d
57 changed files with 167 additions and 161 deletions

View File

@@ -145,7 +145,7 @@ class GPS : private concurrency::OSThread
*/
void publishUpdate();
virtual int32_t runOnce();
virtual int32_t runOnce() override;
};
// Creates an instance of the GPS class.

View File

@@ -23,14 +23,14 @@ class NMEAGPS : public GPS
#endif
public:
virtual bool setupGPS();
virtual bool setupGPS() override;
protected:
/** Subclasses should look for serial rx characters here and feed it to their GPS parser
*
* Return true if we received a valid message from the GPS
*/
virtual bool whileIdle();
virtual bool whileIdle() override;
/**
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
@@ -38,7 +38,7 @@ class NMEAGPS : public GPS
*
* @return true if we've acquired a time
*/
virtual bool lookForTime();
virtual bool lookForTime() override;
/**
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
@@ -46,7 +46,7 @@ class NMEAGPS : public GPS
*
* @return true if we've acquired a new location
*/
virtual bool lookForLocation();
virtual bool lookForLocation() override;
virtual bool hasLock();
virtual bool hasLock() override;
};

View File

@@ -22,22 +22,22 @@ class UBloxGPS : public GPS
*
* @return true for success
*/
bool factoryReset();
bool factoryReset() override;
protected:
/**
* Returns true if we succeeded
*/
virtual bool setupGPS();
virtual bool setupGPS() override;
/** Subclasses should look for serial rx characters here and feed it to their GPS parser
*
* Return true if we received a valid message from the GPS
*/
virtual bool whileIdle();
virtual bool whileIdle() override;
/** Idle processing while GPS is looking for lock */
virtual void whileActive();
virtual void whileActive() override;
/**
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
@@ -45,7 +45,7 @@ class UBloxGPS : public GPS
*
* @return true if we've acquired a time
*/
virtual bool lookForTime();
virtual bool lookForTime() override;
/**
* Perform any processing that should be done only while the GPS is awake and looking for a fix.
@@ -53,12 +53,12 @@ class UBloxGPS : public GPS
*
* @return true if we've acquired a new location
*/
virtual bool lookForLocation();
virtual bool lookForLocation() override;
virtual bool hasLock();
/// If possible force the GPS into sleep/low power mode
virtual void sleep();
virtual void wake();
virtual void sleep() override;
virtual void wake() override;
private:
/// Attempt to connect to our GPS, returns false if no gps is present