@@ -240,15 +240,16 @@ void ArduinoIoTCloudClass::update(int const reconnectionMaxRetries, int const re
240240 (*callback)();
241241 syncStatus = SYNC_STATUS_SYNCHRONIZED;
242242 break ;
243- }
243+ }
244244}
245245
246- void ArduinoIoTCloudClass::sendPropertiesToCloud () {
247- uint8_t data[MQTT_TRANSMIT_BUFFER_SIZE];
248- int const length = Thing.encode (data, sizeof (data));
249- if (length > 0 ) {
250- writeProperties (data, length);
251- }
246+ void ArduinoIoTCloudClass::sendPropertiesToCloud ()
247+ {
248+ uint8_t data[MQTT_TRANSMIT_BUFFER_SIZE];
249+ int const length = Thing.encode (data, sizeof (data));
250+ if (length > 0 ) {
251+ writeProperties (data, length);
252+ }
252253}
253254
254255int ArduinoIoTCloudClass::reconnect (Client& /* net */ )
@@ -348,10 +349,10 @@ void ArduinoIoTCloudClass::handleMessage(int length)
348349
349350void ArduinoIoTCloudClass::requestLastValue ()
350351{
351- // Send the getLastValues CBOR message to the cloud
352- // [{0: "r:m", 3: "getLastValues"}] = 81 A2 00 63 72 3A 6D 03 6D 67 65 74 4C 61 73 74 56 61 6C 75 65 73
353- const uint8_t data[] = { 0x81 , 0xA2 , 0x00 , 0x63 , 0x72 , 0x3A , 0x6D , 0x03 , 0x6D , 0x67 , 0x65 , 0x74 , 0x4C , 0x61 , 0x73 , 0x74 , 0x56 , 0x61 , 0x6C , 0x75 , 0x65 , 0x73 };
354- writeShadowOut (data, sizeof data);
352+ // Send the getLastValues CBOR message to the cloud
353+ // [{0: "r:m", 3: "getLastValues"}] = 81 A2 00 63 72 3A 6D 03 6D 67 65 74 4C 61 73 74 56 61 6C 75 65 73
354+ const uint8_t data[] = { 0x81 , 0xA2 , 0x00 , 0x63 , 0x72 , 0x3A , 0x6D , 0x03 , 0x6D , 0x67 , 0x65 , 0x74 , 0x4C , 0x61 , 0x73 , 0x74 , 0x56 , 0x61 , 0x6C , 0x75 , 0x65 , 0x73 };
355+ writeShadowOut (data, sizeof data);
355356}
356357
357358void ArduinoIoTCloudClass::connectionCheck ()
0 commit comments