Skip to content

Commit 796d687

Browse files
committed
chore: Enable printDebugInfo() for LoRa devices
1 parent 48c9bac commit 796d687

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

examples/ArduinoIoTCloud-Advanced/thingProperties.h

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

13+
#if defined(HAS_LORA)
14+
#define THING_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
15+
#endif
16+
1317
void onSwitchButtonChange();
1418
void onColorChange();
1519

@@ -30,6 +34,8 @@ void initProperties() {
3034
ArduinoCloud.addProperty(switchButton, 1, Permission::Write).onUpdate(onSwitchButtonChange);
3135
ArduinoCloud.addProperty(location, 2, Permission::Read).publishOnChange(0.0f);
3236
ArduinoCloud.addProperty(color, 3, Permission::ReadWrite).onUpdate(onColorChange);
37+
38+
ArduinoCloud.setThingId(THING_ID);
3339
#endif
3440
}
3541

examples/ArduinoIoTCloud-Basic/thingProperties.h

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

13+
#if defined(HAS_LORA)
14+
#define THING_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
15+
#endif
16+
1317
void onLedChange();
1418

1519
bool led;
@@ -29,6 +33,8 @@ void initProperties() {
2933
ArduinoCloud.addProperty(led, 1, Permission::ReadWrite).onUpdate(onLedChange);
3034
ArduinoCloud.addProperty(potentiometer, 2, Permission::Read).publishOnChange(10);
3135
ArduinoCloud.addProperty(seconds, 3, Permission::Read).publishEvery(5 * MINUTES);
36+
37+
ArduinoCloud.setThingId(THING_ID);
3238
#endif
3339
}
3440

examples/ArduinoIoTCloud-Callbacks/thingProperties.h

+7
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,18 @@
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

13+
#if defined(BOARD_HAS_LORA)
14+
#define THING_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
15+
#endif
16+
1317
void initProperties() {
1418
#if defined(BOARD_HAS_SECRET_KEY)
1519
ArduinoCloud.setBoardId(BOARD_ID);
1620
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
1721
#endif
22+
#if defined(BOARD_HAS_LORA)
23+
ArduinoCloud.setThingId(THING_ID);
24+
#endif
1825
}
1926

2027
#if defined(BOARD_HAS_WIFI)

examples/ArduinoIoTCloud-Schedule/thingProperties.h

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1111
#endif
1212

13+
#if defined(HAS_LORA)
14+
#define THING_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
15+
#endif
16+
1317
void onSwitchButtonChange();
1418

1519
bool switchButton;
@@ -37,6 +41,8 @@ void initProperties() {
3741
ArduinoCloud.addProperty(yearly, Permission::ReadWrite);
3842
#elif defined(HAS_LORA)
3943
ArduinoCloud.addProperty(switchButton, 1, Permission::Write);
44+
45+
ArduinoCloud.setThingId(THING_ID);
4046
#endif
4147
}
4248

0 commit comments

Comments
 (0)