From 655805a404942d62452ea23fb24f98983397d2a7 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Fri, 29 Nov 2019 00:32:33 +0300 Subject: [PATCH] ota: hide progress cb under DEBUG_SUPPORT check --- code/espurna/ota_arduinoota.ino | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/espurna/ota_arduinoota.ino b/code/espurna/ota_arduinoota.ino index 7b6d5e91..95011df1 100644 --- a/code/espurna/ota_arduinoota.ino +++ b/code/espurna/ota_arduinoota.ino @@ -63,13 +63,15 @@ void _arduinoOtaOnProgress(unsigned int progress, unsigned int total) { if (wsConnected()) return; #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 }