4747// Define actual debug output functions when necessary.
4848#ifdef WS_DEBUG
4949#define WS_DEBUG_PRINT (...) \
50- { WS_PRINTER.print (__VA_ARGS__); } // /< Prints debug output.
50+ { \
51+ WS_PRINTER.print (__VA_ARGS__); \
52+ } // /< Prints debug output.
5153#define WS_DEBUG_PRINTLN (...) \
52- { WS_PRINTER.println (__VA_ARGS__); } // /< Prints line from debug output.
54+ { \
55+ WS_PRINTER.println (__VA_ARGS__); \
56+ } // /< Prints line from debug output.
5357#define WS_DEBUG_PRINTHEX (...) \
54- { WS_PRINTER.print (__VA_ARGS__, HEX); } // /< Prints debug output.
58+ { \
59+ WS_PRINTER.print (__VA_ARGS__, HEX); \
60+ } // /< Prints debug output.
5561#else
5662#define WS_DEBUG_PRINT (...) \
57- {} // /< Prints debug output
63+ { \
64+ } // /< Prints debug output
5865#define WS_DEBUG_PRINTLN (...) \
59- {} // /< Prints line from debug output.
66+ { \
67+ } // /< Prints line from debug output.
6068#endif
6169
6270#define WS_DELAY_WITH_WDT (timeout ) \
127135#include " display/ws_display_ui_helper.h"
128136#endif
129137
138+ #include " components/display/controller.h"
130139#include " components/ds18x20/ws_ds18x20.h"
131140#include " components/pixels/ws_pixels.h"
132141#include " components/pwm/ws_pwm.h"
133142#include " components/servo/ws_servo.h"
134143#include " components/uart/ws_uart.h"
135- #include " components/display/controller.h"
136144
137145#if defined(USE_TINYUSB)
138146#include " provisioning/tinyusb/Wippersnapper_FS.h"
154162#define TOPIC_INFO " /info/" // /< Registration sub-topic
155163#define TOPIC_SIGNALS " /signals/" // /< Signals sub-topic
156164#define TOPIC_I2C " /i2c" // /< I2C sub-topic
157- #define TOPIC_DISPLAY " /display" // /< Display sub-topic (EPD, OLED, TFT, etc.)
165+ #define TOPIC_DISPLAY " /display" // /< Display sub-topic (EPD, OLED, TFT, etc.)
158166#define MQTT_TOPIC_PIXELS_DEVICE \
159167 " /signals/device/pixel" // /< Pixels device->broker topic
160168#define MQTT_TOPIC_PIXELS_BROKER \
@@ -371,7 +379,8 @@ class Wippersnapper {
371379 ws_servo *_servoComponent; // /< Instance of servo class
372380 ws_ds18x20 *_ds18x20Component; // /< Instance of DS18x20 class
373381 ws_uart *_uartComponent; // /< Instance of UART class
374- DisplayController *_displayController; // /< Instance of display controller class
382+ DisplayController
383+ *_displayController; // /< Instance of display controller class
375384
376385 // TODO: does this really need to be global?
377386 uint8_t _macAddr[6 ]; /* !< Unique network iface identifier */
@@ -408,8 +417,10 @@ class Wippersnapper {
408417 char *_topic_signal_pixels_device = NULL ; /* !< Topic carries pixel messages */
409418 char *_topic_signal_uart_brkr = NULL ; /* !< Topic carries UART messages */
410419 char *_topic_signal_uart_device = NULL ; /* !< Topic carries UART messages */
411- char *_topic_signal_display_brkr = NULL ; /* !< Topic carries messages from a device to a broker. */
412- char *_topic_signal_display_device = NULL ; /* !< Topic carries messages from a broker to a device. */
420+ char *_topic_signal_display_brkr =
421+ NULL ; /* !< Topic carries messages from a device to a broker. */
422+ char *_topic_signal_display_device =
423+ NULL ; /* !< Topic carries messages from a broker to a device. */
413424
414425 wippersnapper_signal_v1_CreateSignalRequest
415426 _incomingSignalMsg; /* !< Incoming signal message from broker */
@@ -436,7 +447,8 @@ class Wippersnapper {
436447 wippersnapper_signal_v1_UARTRequest
437448 msgSignalUART; // /< UARTReq wrapper message
438449
439- wippersnapper_signal_v1_DisplayRequest msgSignalDisplay;
450+ wippersnapper_signal_v1_DisplayRequest
451+ msgSignalDisplay; // /< DisplayRequest wrapper message
440452
441453 char *throttleMessage; /* !< Pointer to throttle message data. */
442454 int throttleTime; /* !< Total amount of time to throttle the device, in
@@ -498,8 +510,8 @@ class Wippersnapper {
498510 *_topic_signal_pixels_sub; /* !< Subscribes to pixel device topic. */
499511 Adafruit_MQTT_Subscribe
500512 *_topic_signal_uart_sub; /* !< Subscribes to signal's UART topic. */
501- Adafruit_MQTT_Subscribe
502- *_topic_signal_display_sub; /* !< Subscription callback for display topic. */
513+ Adafruit_MQTT_Subscribe *_topic_signal_display_sub; /* !< Subscription callback
514+ for display topic. */
503515
504516 Adafruit_MQTT_Subscribe
505517 *_err_sub; /* !< Subscription to Adafruit IO Error topic. */
0 commit comments