Skip to content

Commit 604b889

Browse files
committed
Offline/SD - Clang Format
1 parent 42f83f4 commit 604b889

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

src/components/gps/controller.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class GPSController {
3131
public:
3232
GPSController();
3333
~GPSController();
34-
bool AddGPS(HardwareSerial *serial, uint32_t baudrate, wippersnapper_gps_GPSConfig *gps_config);
34+
bool AddGPS(HardwareSerial *serial, uint32_t baudrate,
35+
wippersnapper_gps_GPSConfig *gps_config);
3536
bool AddGPS(TwoWire *wire, uint32_t i2c_addr,
3637
wippersnapper_gps_GPSConfig *gps_config);
3738
void update();

src/components/gps/hardware.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class GPSHardware {
115115
float GetSpeed();
116116
float GetAngle();
117117
float GetGeoidHeight();
118+
118119
private:
119120
bool QueryModuleType();
120121
bool DetectMtkUart();
@@ -132,15 +133,15 @@ class GPSHardware {
132133
nullptr; ///< Optional Adafruit UBlox DDC instance
133134
Adafruit_UBX *_ubx_gps = nullptr; ///< Optional Adafruit UBX instance
134135
uint32_t _addr; ///< Optional i2c address
135-
ulong _period; ///< Polling period for GPS data (Specified by IO), in ms
136-
ulong _period_prv; ///< Previous period for GPS data (Specified by IO), in ms
137-
ulong _kat_prv; ///< Last time the GPS hardware was polled, in ms
138-
uint32_t _baudrate; ///< Baud rate of UART bus
139-
int _nmea_update_rate; ///< NMEA update rate for GPS data, in Hz
140-
int _nmea_baud_rate; ///< NMEA baud rate for GPS data, in bits per second
136+
ulong _period; ///< Polling period for GPS data (Specified by IO), in ms
137+
ulong _period_prv; ///< Previous period for GPS data (Specified by IO), in ms
138+
ulong _kat_prv; ///< Last time the GPS hardware was polled, in ms
139+
uint32_t _baudrate; ///< Baud rate of UART bus
140+
int _nmea_update_rate; ///< NMEA update rate for GPS data, in Hz
141+
int _nmea_baud_rate; ///< NMEA baud rate for GPS data, in bits per second
141142
int NmeaBufPush(
142-
const char *new_sentence); ///< Push a sentence to the NMEA ring buffer
143-
nmea_buffer_t _nmea_buff; ///< NMEA ring buffer for storing sentences
143+
const char *new_sentence); ///< Push a sentence to the NMEA ring buffer
144+
nmea_buffer_t _nmea_buff; ///< NMEA ring buffer for storing sentences
144145
};
145146
extern Wippersnapper_V2 WsV2; ///< Wippersnapper V2 instance
146147
#endif // WS_GPS_HARDWARE_H

src/components/uart/drivers/drvUartPm25.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ class drvUartPm25 : public drvUartBase {
5454
The port number for the UART device corresponding to the Serial
5555
instance.
5656
*/
57-
drvUartPm25(SoftwareSerial *sw_serial,
58-
const char *driver_name, uint32_t port_num)
57+
drvUartPm25(SoftwareSerial *sw_serial, const char *driver_name,
58+
uint32_t port_num)
5959
: drvUartBase(sw_serial, driver_name, port_num) {
6060
// Handled by drvUartBase constructor
6161
}
@@ -81,7 +81,7 @@ class drvUartPm25 : public drvUartBase {
8181

8282
_pm25 = new Adafruit_PM25AQI();
8383
if (_pm25 == nullptr)
84-
return false;
84+
return false;
8585

8686
delay(1000); // Wait for the sensor to boot
8787
return _pm25->begin_UART(_hw_serial);

src/components/uart/hardware.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ class UARTHardware {
5656

5757
private:
5858
wippersnapper_uart_UartSerialConfig
59-
_config; ///< The UART serial configuration
60-
#ifdef ARDUINO_ARCH_RP2040
59+
_config; ///< The UART serial configuration
60+
#ifdef ARDUINO_ARCH_RP2040
6161
SerialUART *_hwSerial = nullptr; ///< Pointer to the SerialUART instance
62-
#else
62+
#else
6363
HardwareSerial *_hwSerial = nullptr; ///< HardwareSerial instance for this bus
64-
#endif
64+
#endif
6565
#if HAS_SW_SERIAL
6666
SoftwareSerial *_swSerial = nullptr; ///< SoftwareSerial instance for this bus
6767
#endif // HAS_SW_SERIAL

src/provisioning/sdcard/ws_sdcard.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,12 @@ bool ws_sdcard::ParseUartAdd(JsonObject &component,
476476
wippersnapper_uart_UartAdd &msg_uart_add) {
477477
// Configure the Serial
478478
msg_uart_add.has_cfg_serial = true;
479-
snprintf(msg_uart_add.cfg_serial.pin_rx, sizeof(msg_uart_add.cfg_serial.pin_rx),
480-
"%d", component["pinRx"] | -1);
481-
snprintf(msg_uart_add.cfg_serial.pin_tx, sizeof(msg_uart_add.cfg_serial.pin_tx),
482-
"%d", component["pinTx"] | -1);
479+
snprintf(msg_uart_add.cfg_serial.pin_rx,
480+
sizeof(msg_uart_add.cfg_serial.pin_rx), "%d",
481+
component["pinRx"] | -1);
482+
snprintf(msg_uart_add.cfg_serial.pin_tx,
483+
sizeof(msg_uart_add.cfg_serial.pin_tx), "%d",
484+
component["pinTx"] | -1);
483485
msg_uart_add.cfg_serial.uart_nbr = component["uartNbr"] | 0;
484486
msg_uart_add.cfg_serial.baud_rate = component["baudRate"] | 9600;
485487
msg_uart_add.cfg_serial.format =

0 commit comments

Comments
 (0)