diff --git a/Board320_240.cpp b/Board320_240.cpp index 472a9f3..0f35fa6 100644 --- a/Board320_240.cpp +++ b/Board320_240.cpp @@ -1286,7 +1286,7 @@ void Board320_240::redrawScreen() { // SDCARD recording /*liveData->params.sdcardRecording*/ - if (liveData->settings.sdcardEnabled == 1) { + if (liveData->settings.sdcardEnabled == 1 && (liveData->params.mainLoopCounter & 1) == 1) { spr.fillCircle((displayScreen == SCREEN_SPEED || displayScreenAutoMode == SCREEN_SPEED) ? 140 : 310, 10, 4, TFT_BLACK); spr.fillCircle((displayScreen == SCREEN_SPEED || displayScreenAutoMode == SCREEN_SPEED) ? 140 : 310, 10, 3, (liveData->params.sdcardInit == 1) ? @@ -1354,6 +1354,8 @@ void Board320_240::loadTestData() { */ void Board320_240::mainLoop() { + liveData->params.mainLoopCounter++; + /////////////////////////////////////////////////////////////////////// // Handle buttons // MIDDLE - menu select diff --git a/LiveData.cpp b/LiveData.cpp index 172709a..3eee77e 100644 --- a/LiveData.cpp +++ b/LiveData.cpp @@ -15,6 +15,7 @@ void debug(String msg, uint8_t debugLevel) { */ void LiveData::initParams() { + params.mainLoopCounter = 0; // SIM params.lastDataSent = 0; params.sim800l_enabled = false; diff --git a/LiveData.h b/LiveData.h index dfb801f..53fbaa4 100644 --- a/LiveData.h +++ b/LiveData.h @@ -45,6 +45,7 @@ typedef struct { // System time_t currentTime; time_t chargingStartTime; + uint32_t mainLoopCounter; // SIM time_t lastDataSent; bool sim800l_enabled;