UART Command Parser Time Manager Data Store for SD Card for stm32l476 [it's not Licensed as BSD/GPLx]

Dependencies:   mbed SDFileSystem

Revision:
12:a45a9c65dc03
Parent:
10:db2be22bc2f9
Child:
16:602bc04e3cb5
--- a/common/DeviceRepeater.cpp	Sat May 18 03:45:38 2019 +0000
+++ b/common/DeviceRepeater.cpp	Wed May 22 09:10:18 2019 +0000
@@ -134,11 +134,15 @@
         repeat_remain_sec--;
     }
     if (repeat_remain_sec == 0) {
+        FILE *pSDFile = pSds->getFilePointer();
         /*****************************************************/
         /* TODO - kick Senser and send XFD/XDS Data */
         /*****************************************************/
         /** Sensing and Sending Data **/
-        pDriver->exec(deviceID, pUR->getCurrentUart(), pSds->getFilePointer());
+        pDriver->exec(deviceID, pUR->getCurrentUart(), pSDFile);
+        if (pSDFile != NULL) {
+            fflush(pSDFile);
+        }
     }
     if (repeat_remain_sec <= 0) {
         if (repeat_remain_cnt > 0) {