]> granicus.if.org Git - esp-idf/commitdiff
aws-iot: Make thing shadow example compatible with v3 of aws iot sdk
authorAnuj Deshpande <anuj@espressif.com>
Mon, 6 Aug 2018 08:44:52 +0000 (14:14 +0530)
committerAnuj Deshpande <anuj@espressif.com>
Tue, 7 Aug 2018 05:58:54 +0000 (11:28 +0530)
examples/protocols/aws_iot/thing_shadow/main/thing_shadow_sample.c

index 0a382b9d6b4922aba2886a59670d91d2f56a8864..82ef783585b3d4309f9f0ab0a390cddb0667c329 100644 (file)
@@ -200,12 +200,14 @@ void aws_iot_task(void *param) {
     windowActuator.pData = &windowOpen;
     windowActuator.pKey = "windowOpen";
     windowActuator.type = SHADOW_JSON_BOOL;
+    windowActuator.dataLength = sizeof(bool);
 
     jsonStruct_t temperatureHandler;
     temperatureHandler.cb = NULL;
     temperatureHandler.pKey = "temperature";
     temperatureHandler.pData = &temperature;
     temperatureHandler.type = SHADOW_JSON_FLOAT;
+    temperatureHandler.dataLength = sizeof(float);
 
     ESP_LOGI(TAG, "AWS IoT SDK Version %d.%d.%d-%s", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_TAG);