Skip to content

Commit fc24b5b

Browse files
pennamandreagilardoni
authored andcommitted
ArduinoIoTCloudDevice: switch to messages
1 parent 4cef3d5 commit fc24b5b

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

110110
ArduinoCloudDevice::State ArduinoCloudDevice::handleSendCapabilities() {
111111
/* Sends device capabilities message */
112-
Message message = { DeviceBeginCmdId };
113-
deliver(&message);
112+
DeviceBeginCmd deviceBegin = { DeviceBeginCmdId, AIOT_CONFIG_LIB_VERSION };
113+
deliver(reinterpret_cast<Message*>(&deviceBegin));
114114

115115
/* Subscribe to device topic to request */
116-
message = { ThingBeginCmdId };
117-
deliver(&message);
116+
ThingBeginCmd thingBegin = { ThingBeginCmdId };
117+
deliver(reinterpret_cast<Message*>(&thingBegin));
118118

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

0 commit comments

Comments
 (0)