Skip to content

Commit cfb893d

Browse files
committed
debugging failed to subscribe err
1 parent e8fbd87 commit cfb893d

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

src/Wippersnapper.cpp

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,7 +2424,7 @@ bool Wippersnapper::generateWSTopics() {
24242424

24252425
// /display topic //
24262426

2427-
// Pre-determine topic size
2427+
// Pre-determine topic size
24282428
topicLen = strlen(WS._config.aio_user) + strlen("/") + strlen(_device_uid) +
24292429
strlen("/wprsnpr/") + strlen(TOPIC_SIGNALS) + strlen("broker") +
24302430
strlen(TOPIC_DISPLAY) + 1;
@@ -2942,6 +2942,26 @@ void Wippersnapper::connect() {
29422942
haltError("Unable to allocate space for MQTT error topics");
29432943
}
29442944

2945+
// TODO: We are debugging the "Failed to subscribe" issue here prior to
2946+
// runNetFSM Print out all topics generated by generateWSTopics()
2947+
WS_DEBUG_PRINTLN("MQTT Topics:");
2948+
WS_DEBUG_PRINT(" Device UID: ");
2949+
WS_DEBUG_PRINTLN(_device_uid);
2950+
// Broker topics only
2951+
WS_DEBUG_PRINT(" Broker-to-Device DS18x20 Topic: ");
2952+
WS_DEBUG_PRINTLN(WS._topic_signal_ds18_device);
2953+
WS_DEBUG_PRINT(" Broker-to-Device Servo Topic: ");
2954+
WS_DEBUG_PRINTLN(WS._topic_signal_servo_device);
2955+
WS_DEBUG_PRINT(" Broker-to-Device PWM Topic: ");
2956+
WS_DEBUG_PRINTLN(WS._topic_signal_pwm_device);
2957+
WS_DEBUG_PRINT(" Broker-to-Device Pixels Topic: ");
2958+
WS_DEBUG_PRINTLN(WS._topic_signal_pixels_device);
2959+
WS_DEBUG_PRINT(" Broker-to-Device UART Topic: ");
2960+
WS_DEBUG_PRINTLN(WS._topic_signal_uart_device);
2961+
WS_DEBUG_PRINT(" Broker-to-Device Display Topic: ");
2962+
WS_DEBUG_PRINTLN(WS._topic_signal_display_device);
2963+
delay(500);
2964+
29452965
// Connect to Network
29462966
WS_DEBUG_PRINTLN("Running Network FSM...");
29472967
// Run the network fsm
@@ -2994,13 +3014,6 @@ void Wippersnapper::connect() {
29943014
statusLEDFade(GREEN, 3);
29953015
WS_DEBUG_PRINTLN(
29963016
"Registration and configuration complete!\nRunning application...");
2997-
2998-
// Print out display topics
2999-
WS_DEBUG_PRINTLN("Device-to-Broker DISPLAY topic: ");
3000-
WS_DEBUG_PRINTLN(WS._topic_signal_display_device);
3001-
WS_DEBUG_PRINTLN("Broker-to-Device DISPLAY topic: ");
3002-
WS_DEBUG_PRINTLN(WS._topic_signal_display_brkr);
3003-
delay(500);
30043017
}
30053018

30063019
/**************************************************************************/

src/Wippersnapper_demo.ino.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 1 "/var/folders/ff/dmzflvf52tq9kzvt6g8jglxw0000gn/T/tmplty6x38x"
1+
# 1 "/var/folders/ff/dmzflvf52tq9kzvt6g8jglxw0000gn/T/tmpbebqve76"
22
#include <Arduino.h>
33
# 1 "/Users/brentrubell/Documents/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino"
44
# 16 "/Users/brentrubell/Documents/Arduino/libraries/Adafruit_Wippersnapper_Arduino/src/Wippersnapper_demo.ino"

src/components/display/drivers/dispDrvThinkInkGrayscale4Eaamfgn.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*!
22
* @file src/components/display/drivers/drvDispThinkInkGrayscale4Eaamfgn.h
33
*
4-
* Driver for ThinkInk 2.9" Grayscale 4-level EAAMFGN display (present on the 2025 version of the Adafruit MagTag)
4+
* Driver for ThinkInk 2.9" Grayscale 4-level EAAMFGN display (present on the
5+
* 2025 version of the Adafruit MagTag)
56
*
67
* Adafruit invests time and resources providing this open source code,
78
* please support Adafruit and open-source hardware by purchasing

src/components/display/hardware.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ static const std::map<std::string, FnCreateDispDrv> FactoryDrvDisp = {
3232
[](int16_t dc, int16_t rst, int16_t cs, int16_t sram_cs,
3333
int16_t busy) -> dispDrvBase * {
3434
return new drvDispThinkInkGrayscale4Eaamfgn(dc, rst, cs, sram_cs, busy);
35-
}}
36-
};
35+
}}};
3736

3837
/*!
3938
@brief Creates a new display driver instance based on the driver name.

0 commit comments

Comments
 (0)