Skip to content

Commit

Permalink
ArduinoIoTCloudDevice: switch to messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam authored and andreagilardoni committed Apr 22, 2024
1 parent 4cef3d5 commit fc24b5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ArduinoIoTCloudDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ ArduinoCloudDevice::State ArduinoCloudDevice::handleInit() {

ArduinoCloudDevice::State ArduinoCloudDevice::handleSendCapabilities() {
/* Sends device capabilities message */
Message message = { DeviceBeginCmdId };
deliver(&message);
DeviceBeginCmd deviceBegin = { DeviceBeginCmdId, AIOT_CONFIG_LIB_VERSION };
deliver(reinterpret_cast<Message*>(&deviceBegin));

/* Subscribe to device topic to request */
message = { ThingBeginCmdId };
deliver(&message);
ThingBeginCmd thingBegin = { ThingBeginCmdId };
deliver(reinterpret_cast<Message*>(&thingBegin));

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

0 comments on commit fc24b5b

Please sign in to comment.