Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 241a834

Browse files
pennamandreagilardoni
authored andcommittedApr 22, 2024
ArduinoIoTCloudDevice: switch to messages
1 parent 281c1f8 commit 241a834

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎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)
Please sign in to comment.