clang hates trailing white space

This commit is contained in:
Rick Sellens 2020-01-19 08:56:06 -05:00
parent 0051f37600
commit c006654469
4 changed files with 44 additions and 41 deletions

View File

@ -323,7 +323,9 @@ boolean Adafruit_GPS::parseFix(char *p) {
@return nmea_float_t value in seconds since last fix.
*/
/**************************************************************************/
nmea_float_t Adafruit_GPS::secondsSinceFix() { return (millis() - lastFix) / 1000.; }
nmea_float_t Adafruit_GPS::secondsSinceFix() {
return (millis() - lastFix) / 1000.;
}
/**************************************************************************/
/*!
@ -332,7 +334,9 @@ nmea_float_t Adafruit_GPS::secondsSinceFix() { return (millis() - lastFix) / 100
@return nmea_float_t value in seconds since last GPS time.
*/
/**************************************************************************/
nmea_float_t Adafruit_GPS::secondsSinceTime() { return (millis() - lastTime) / 1000.; }
nmea_float_t Adafruit_GPS::secondsSinceTime() {
return (millis() - lastTime) / 1000.;
}
/**************************************************************************/
/*!
@ -341,7 +345,9 @@ nmea_float_t Adafruit_GPS::secondsSinceTime() { return (millis() - lastTime) / 1
@return nmea_float_t value in seconds since last GPS date.
*/
/**************************************************************************/
nmea_float_t Adafruit_GPS::secondsSinceDate() { return (millis() - lastDate) / 1000.; }
nmea_float_t Adafruit_GPS::secondsSinceDate() {
return (millis() - lastDate) / 1000.;
}
/**************************************************************************/
/*!

View File

@ -53,10 +53,10 @@
#if (defined(__AVR__) || defined(ESP8266)) && defined(USE_SW_SERIAL)
#include <SoftwareSerial.h>
#endif
#include <SPI.h>
#include <Wire.h>
#include <NMEA_data.h>
#include <Adafruit_PMTK.h>
#include <SPI.h>
#include <Wire.h>
/// type for resulting code from running check()
typedef enum {
@ -129,10 +129,10 @@ public:
uint8_t month; ///< GMT month
uint8_t day; ///< GMT day
nmea_float_t latitude; ///< Floating point latitude value in degrees/minutes as
///< received from the GPS (DDMM.MMMM)
nmea_float_t longitude; ///< Floating point longitude value in degrees/minutes as
///< received from the GPS (DDDMM.MMMM)
nmea_float_t latitude; ///< Floating point latitude value in degrees/minutes
///< as received from the GPS (DDMM.MMMM)
nmea_float_t longitude; ///< Floating point longitude value in degrees/minutes
///< as received from the GPS (DDDMM.MMMM)
/** Fixed point latitude and longitude value with degrees stored in units of
1/100000 degrees, and minutes stored in units of 1/100000 degrees. See pull
@ -147,17 +147,17 @@ public:
nmea_float_t altitude; ///< Altitude in meters above MSL
nmea_float_t speed; ///< Current speed over ground in knots
nmea_float_t angle; ///< Course in degrees from true north
nmea_float_t magvariation; ///< Magnetic variation in degrees (vs. true north)
nmea_float_t HDOP; ///< Horizontal Dilution of Precision - relative accuracy of
///< horizontal position
nmea_float_t VDOP; ///< Vertical Dilution of Precision - relative accuracy of
///< vertical position
nmea_float_t PDOP; ///< Position Dilution of Precision - Complex maths derives a
///< simple, single number for each kind of DOP
char lat = 'X'; ///< N/S
char lon = 'X'; ///< E/W
char mag = 'X'; ///< Magnetic variation direction
boolean fix; ///< Have a fix?
nmea_float_t magvariation; ///< Magnetic variation in degrees (vs. true north)
nmea_float_t HDOP; ///< Horizontal Dilution of Precision - relative accuracy
///< of horizontal position
nmea_float_t VDOP; ///< Vertical Dilution of Precision - relative accuracy
///< of vertical position
nmea_float_t PDOP; ///< Position Dilution of Precision - Complex maths derives
///< a simple, single number for each kind of DOP
char lat = 'X'; ///< N/S
char lon = 'X'; ///< E/W
char mag = 'X'; ///< Magnetic variation direction
boolean fix; ///< Have a fix?
uint8_t fixquality; ///< Fix quality (0, 1, 2 = Invalid, GPS, DGPS)
uint8_t fixquality_3d; ///< 3D fix quality (1, 3, 3 = Nofix, 2D fix, 3D fix)
uint8_t satellites; ///< Number of satellites in use

View File

@ -46,12 +46,12 @@ typedef double
192 history values taken every 20 seconds covers just over an hour.
**************************************************************************/
typedef struct {
int16_t *data = NULL; ///< array of ints, oldest first
unsigned n = 0; ///< number of history array elements
uint32_t lastHistory = 0; ///< millis() when history was last updated
uint16_t historyInterval = 20; ///< seconds between history updates
nmea_float_t scale = 1.0; ///< history = (smoothed - offset) * scale
nmea_float_t offset = 0.0; ///< value = (float) history / scale + offset
int16_t *data = NULL; ///< array of ints, oldest first
unsigned n = 0; ///< number of history array elements
uint32_t lastHistory = 0; ///< millis() when history was last updated
uint16_t historyInterval = 20; ///< seconds between history updates
nmea_float_t scale = 1.0; ///< history = (smoothed - offset) * scale
nmea_float_t offset = 0.0; ///< value = (float) history / scale + offset
} nmea_history_t;
/**************************************************************************/
@ -93,18 +93,16 @@ typedef enum {
typedef struct {
nmea_float_t latest = 0.0; ///< the most recently obtained value
nmea_float_t smoothed =
0.0; ///< smoothed value based on weight of dt/response
uint32_t lastUpdate = 0; ///< millis() when latest was last set
uint16_t response =
1000; ///< time constant in millis for smoothing
0.0; ///< smoothed value based on weight of dt/response
uint32_t lastUpdate = 0; ///< millis() when latest was last set
uint16_t response = 1000; ///< time constant in millis for smoothing
nmea_value_type_t type =
NMEA_SIMPLE_FLOAT; ///< type of float data value represented
byte ockam =
0; ///< the corresponding Ockam Instruments tag number, 0-128
byte ockam = 0; ///< the corresponding Ockam Instruments tag number, 0-128
nmea_history_t *hist = NULL; ///< pointer to history, if any
char *label = NULL; ///< pointer to quantity label, if any
char *unit = NULL; ///< pointer to units label, if any
char *fmt = NULL; ///< pointer to format string, if any
char *label = NULL; ///< pointer to quantity label, if any
char *unit = NULL; ///< pointer to units label, if any
char *fmt = NULL; ///< pointer to format string, if any
} nmea_datavalue_t;
/**************************************************************************/

View File

@ -229,4 +229,3 @@ boolean Adafruit_GPS::parse(char *nmea) {
lastUpdate = millis();
return true;
}