Index: sources/storage/StorageGlobals.cpp =================================================================== diff -u -rec7f919fdb70ff29a8de627937e4ad7008e59c1c -r3a528c6f3fce8132de2791b55d3227e715d68898 --- sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision ec7f919fdb70ff29a8de627937e4ad7008e59c1c) +++ sources/storage/StorageGlobals.cpp (.../StorageGlobals.cpp) (revision 3a528c6f3fce8132de2791b55d3227e715d68898) @@ -40,7 +40,18 @@ const char *USB_File_System = "vfat"; // SD-CARD - const short Available_Space_Percent = 15; + const short Log_Min_Available_Total_Space_Percent = 15; // Min free : 15 // always has to be 15 percent free space available, less than this triggers the log cleanup. + const short Log_Max_Allowable_Event_Space_Percent = 25; + const short Log_Max_Allowable_Datum_Space_Percent = 25; + const short Log_Max_Allowable_AppED_Space_Percent = Log_Max_Allowable_Event_Space_Percent + Log_Max_Allowable_Datum_Space_Percent; // 50 + const short Log_Max_Allowable_Debug_Space_Percent = 15; + const short Log_Max_Allowable_Trtmt_Space_Percent = 10; + // // Max Usage : 75 = 25 + 25 + 15 + 10 + // // Max Used : 85 = 100 - 15 + // // Min Buffer : 10 = 85 - 75 + // IMPORTANT: we have to keep 10% buffer otherwise competition between filling and deleting logs will cause application to crash eventually. + short Log_Min_Available_Total_Space_IsLow(short vPercent) { return vPercent < Log_Min_Available_Total_Space_Percent; } + #ifdef BUILD_FOR_TARGET const char *SDCard_Base_Path_Name = "/media/sd-card/"; #else