fixed some compiler warnings
added equality checks to sensor-data classes more robust sensor reader [fixed some issues] added support for gps added support for compass added sensor-data-writer added test-cases minor changes
This commit is contained in:
@@ -13,6 +13,19 @@ struct BarometerData {
|
||||
|
||||
explicit BarometerData(const float hPa) : hPa(hPa) {;}
|
||||
|
||||
/** valid data? */
|
||||
bool isValid() const {
|
||||
return hPa == hPa;
|
||||
}
|
||||
|
||||
bool operator == (const BarometerData& o ) const {
|
||||
return EQ_OR_NAN(hPa, o.hPa);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
static inline bool EQ_OR_NAN(const float a, const float b) {return (a==b) || ( (a!=a) && (b!=b) );}
|
||||
|
||||
};
|
||||
|
||||
#endif // BAROMETERDATA_H
|
||||
|
||||
Reference in New Issue
Block a user