
UART Command Parser Time Manager Data Store for SD Card for stm32l476 [it's not Licensed as BSD/GPLx]
Dependencies: mbed SDFileSystem
Diff: common/DeviceRepeater.cpp
- Revision:
- 16:602bc04e3cb5
- Parent:
- 12:a45a9c65dc03
- Child:
- 17:c2709a9c0a68
--- a/common/DeviceRepeater.cpp Mon May 27 08:17:29 2019 +0000 +++ b/common/DeviceRepeater.cpp Thu May 30 03:00:15 2019 +0000 @@ -92,6 +92,7 @@ /* TODO - add callback for changing READY to RUNNING */ pDriver->ready2run(); + pSds->syncFile(); // start Runnig // Device is in DEV_RUNNING @@ -124,6 +125,7 @@ /* TODO - add callback for changing RUNNING to READY */ /*****************************************************/ pDriver->run2ready(); + pSds->syncFile(); repeat_remain_sec = 0; stat = DEV_READY; return; @@ -140,9 +142,7 @@ /*****************************************************/ /** Sensing and Sending Data **/ pDriver->exec(deviceID, pUR->getCurrentUart(), pSDFile); - if (pSDFile != NULL) { - fflush(pSDFile); - } + pSds->syncFile(); } if (repeat_remain_sec <= 0) { if (repeat_remain_cnt > 0) { @@ -153,6 +153,7 @@ /* TODO - add callback for changing RUNNING to READY */ /*****************************************************/ pDriver->run2ready(); + pSds->syncFile(); repeat_remain_sec = 0; stat = DEV_READY; pClock->detach();