able to subscribe for >10hrs and still running
Dependencies: ADE7758_v1 Crypto DHT11 MQTT MbedJSONValue SDFileSystem SPI_TFT_ILI9341 SWSPI SetRTC TFT_fonts Touch W5500Interface mbed-rtos mbed-src tuanpm
Fork of PB_emma_controller_mbed_src by
Revision 2:fdfdeb5fd6fd, committed 2015-07-03
- Comitter:
- arsenalist
- Date:
- Fri Jul 03 07:24:07 2015 +0000
- Parent:
- 1:d314a43ae6f7
- Child:
- 3:e7fcbe6deb19
- Commit message:
- Power measurement thread and send data, without MQTT command.
Changed in this revision
emmaCode.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;