Skip to content

Commit 2edadae

Browse files
committed
ArduinoIoTCloudDevice: switch to messages
1 parent d755efe commit 2edadae

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
@@ -104,12 +104,12 @@ ArduinoCloudDevice::State ArduinoCloudDevice::handleInit() {
104104

105105
ArduinoCloudDevice::State ArduinoCloudDevice::handleSendCapabilities() {
106106
/* Sends device capabilities message */
107-
Message message = { DeviceBeginCmdId };
108-
deliver(&message);
107+
DeviceBeginCmd deviceBegin = { DeviceBeginCmdId, AIOT_CONFIG_LIB_VERSION };
108+
deliver(reinterpret_cast<Message*>(&deviceBegin));
109109

110110
/* Subscribe to device topic to request */
111-
message = { ThingBeginCmdId };
112-
deliver(&message);
111+
ThingBeginCmd thingBegin = { ThingBeginCmdId };
112+
deliver(reinterpret_cast<Message*>(&thingBegin));
113113

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

0 commit comments

Comments
 (0)