File tree Expand file tree Collapse file tree 6 files changed +18
-16
lines changed Expand file tree Collapse file tree 6 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 20
20
#ifndef WS_WIFI_AIRLIFT_H
21
21
#define WS_WIFI_AIRLIFT_H
22
22
23
+ #include " ../../helpers/ws_helper_macros.h"
23
24
#include " Adafruit_MQTT.h"
24
25
#include " Adafruit_MQTT_Client.h"
25
26
#include " Arduino.h"
26
27
#include " SPI.h"
27
28
#include " WiFiNINA.h"
28
29
#include " Wippersnapper_V2.h"
29
- #include " ../../helpers/ws_helper_macros.h"
30
30
31
- #define NINAFWVER " 2.0.0-rc.0+adafruit" /* !< min. nina-fw version compatible with this library. */
31
+ #define NINAFWVER \
32
+ " 2.0.0-rc.0+adafruit" /* !< min. nina-fw version compatible with this \
33
+ library. */
32
34
#define AIRLIFT_CONNECT_TIMEOUT_MS 20000 /* !< Connection timeout (in ms) */
33
35
#define AIRLIFT_CONNECT_RETRY_DELAY_MS 200 /* !< delay time between retries. */
34
36
@@ -301,7 +303,7 @@ class ws_wifi_airlift : public Wippersnapper_V2 {
301
303
void _connect () {
302
304
if (strlen (_ssid) == 0 ) {
303
305
_statusV2 = WS_SSID_INVALID; // possibly unneccesary as already checking
304
- // elsewhere
306
+ // elsewhere
305
307
} else {
306
308
// disconnect from possible previous connection
307
309
_disconnect ();
Original file line number Diff line number Diff line change 19
19
@brief AnalogIOModel constructor
20
20
*/
21
21
/* **********************************************************************/
22
- AnalogIOModel::AnalogIOModel ()
23
- {
22
+ AnalogIOModel::AnalogIOModel () {
24
23
memset (&_msg_AnalogioAdd, 0 , sizeof (_msg_AnalogioAdd));
25
24
memset (&_msg_AnalogioRemove, 0 , sizeof (_msg_AnalogioRemove));
26
25
memset (&_msg_AnalogioEvent, 0 , sizeof (_msg_AnalogioEvent));
Original file line number Diff line number Diff line change 19
19
@brief DS18X20Model constructor
20
20
*/
21
21
/* **********************************************************************/
22
- DS18X20Model::DS18X20Model ()
23
- {
22
+ DS18X20Model::DS18X20Model () {
24
23
memset (&_msg_DS18x20Add, 0 , sizeof (_msg_DS18x20Add));
25
24
memset (&_msg_DS18x20Added, 0 , sizeof (_msg_DS18x20Added));
26
25
memset (&_msg_DS18x20Remove, 0 , sizeof (_msg_DS18x20Remove));
Original file line number Diff line number Diff line change 18
18
#include " hardware.h"
19
19
#include " model.h"
20
20
21
- #define MAX_PIXEL_STRANDS 10 // /< Maximum number of pixel strands connected to a WipperSnapper device
21
+ #define MAX_PIXEL_STRANDS \
22
+ 10 // /< Maximum number of pixel strands connected to a WipperSnapper device
22
23
#define STRAND_NOT_FOUND 0xFF // /< Strand not found in the array
23
24
24
25
class Wippersnapper_V2 ; // /< Forward declaration
@@ -39,11 +40,13 @@ class PixelsController {
39
40
bool Handle_Pixels_Add (pb_istream_t *stream);
40
41
bool Handle_Pixels_Write (pb_istream_t *stream);
41
42
bool Handle_Pixels_Remove (pb_istream_t *stream);
43
+
42
44
private:
43
45
PixelsModel *_pixels_model = nullptr ; // /< Pointer to the model class
44
- PixelsHardware *_pixel_strands[MAX_PIXEL_STRANDS] = {nullptr }; // /< Pointer to the hardware class
45
- uint8_t _num_strands; // /< Number of pixel strands
46
+ PixelsHardware *_pixel_strands[MAX_PIXEL_STRANDS] = {
47
+ nullptr }; // /< Pointer to the hardware class
48
+ uint8_t _num_strands; // /< Number of pixel strands
46
49
uint16_t GetStrandIndex (uint16_t pin_data); // Returns 0xFF if not found
47
50
};
48
51
extern Wippersnapper_V2 WsV2; // /< Global V2 instance
49
- #endif // WS_PIXELS_CONTROLLER_H
52
+ #endif // WS_PIXELS_CONTROLLER_H
Original file line number Diff line number Diff line change 19
19
@brief SensorModel constructor
20
20
*/
21
21
/* **********************************************************************/
22
- SensorModel::SensorModel ()
23
- {
22
+ SensorModel::SensorModel () {
24
23
memset (&_msg_sensor_event, 0 , sizeof (_msg_sensor_event));
25
24
// no-op
26
25
}
Original file line number Diff line number Diff line change @@ -404,9 +404,9 @@ void ws_display_ui_helper::build_scr_monitor() {
404
404
/* *************************************************************************/
405
405
void ws_display_ui_helper::add_text_to_terminal (const char *text) {
406
406
Serial.println (" add_text_to_terminal" );
407
- /* char txtBuffer[256]; // temporary text buffer for snprintf
408
- snprintf(txtBuffer, 256, text);
409
- addToTerminal(txtBuffer); */
407
+ /* char txtBuffer[256]; // temporary text buffer for snprintf
408
+ snprintf(txtBuffer, 256, text);
409
+ addToTerminal(txtBuffer); */
410
410
}
411
411
412
412
/* *************************************************************************/
You can’t perform that action at this time.
0 commit comments