Skip to content

Commit 647858c

Browse files
committed
ArduinoIoTCloudDevice: switch to messages
1 parent d549cb7 commit 647858c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/ArduinoIoTCloudDevice.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ ArduinoCloudDevice::State ArduinoCloudDevice::handleInit() {
102102

103103
ArduinoCloudDevice::State ArduinoCloudDevice::handleSendCapabilities() {
104104
/* Sends device capabilities message */
105-
Message message = { DeviceBeginCmdId };
106-
deliver(&message);
105+
DeviceBeginCmd deviceBegin = { DeviceBeginCmdId, AIOT_CONFIG_LIB_VERSION };
106+
deliver(reinterpret_cast<Message*>(&deviceBegin));
107107

108108
/* Subscribe to device topic to request */
109-
message = { ThingBeginCmdId };
110-
deliver(&message);
109+
ThingBeginCmd thingBegin = { ThingBeginCmdId };
110+
deliver(reinterpret_cast<Message*>(&thingBegin));
111111

112112
/* No device configuration received. Wait: 4s -> 8s -> 16s -> 32s -> 32s ...*/
113113
_attachAttempt.retry();

0 commit comments

Comments
 (0)