emma controller code in production board v1
Dependencies: ADE7758_v1 Crypto DHT11 MQTT MbedJSONValueEmma SDFileSystem TFT_ILI9341 SWSPI SetRTC TFT_fonts Touch W5500Interface mbed-rtos mbed-src SoftSerial
Fork of emma_controller_energy by
Diff: emmaCode.cpp
- Revision:
- 2:fdfdeb5fd6fd
- Parent:
- 1:d314a43ae6f7
- Child:
- 3:e7fcbe6deb19
diff -r d314a43ae6f7 -r fdfdeb5fd6fd emmaCode.cpp --- a/emmaCode.cpp Fri Jul 03 07:15:29 2015 +0000 +++ b/emmaCode.cpp Fri Jul 03 07:24:07 2015 +0000 @@ -659,7 +659,7 @@ ADE.CVAhLSB = 0; //create thread - //osThreadCreate(osThread(energyThread),NULL); + osThreadCreate(osThread(energyThread),NULL); t.start(); tEnergy.start(); @@ -855,7 +855,8 @@ } } newCommand = false; - } + } + osDelay(100); } } //operation eth @@ -1145,6 +1146,7 @@ //osDelay(5000); //calculate energy + DBG.printf("[energyThread start]\r\n"); float period = 0; AWattHrSum = 0; BWattHrSum = 0;