Browse Source

ota: hide progress cb under DEBUG_SUPPORT check

master
Maxim Prokhorov 5 years ago
parent
commit
655805a404
1 changed files with 8 additions and 6 deletions
  1. +8
    -6
      code/espurna/ota_arduinoota.ino

+ 8
- 6
code/espurna/ota_arduinoota.ino View File

@ -63,13 +63,15 @@ void _arduinoOtaOnProgress(unsigned int progress, unsigned int total) {
if (wsConnected()) return; if (wsConnected()) return;
#endif #endif
static unsigned int _progOld;
#if DEBUG_SUPPORT
static unsigned int _progOld;
unsigned int _prog = (progress / (total / 100));
if (_prog != _progOld) {
DEBUG_MSG_P(PSTR("[OTA] Progress: %u%%\r"), _prog);
_progOld = _prog;
}
unsigned int _prog = (progress / (total / 100));
if (_prog != _progOld) {
DEBUG_MSG_P(PSTR("[OTA] Progress: %u%%\r"), _prog);
_progOld = _prog;
}
#endif
} }


Loading…
Cancel
Save