DPL: do not repeat being disabled
This commit is contained in:
parent
9bab740c43
commit
461fce8ff4
@ -58,6 +58,10 @@ void PowerLimiterClass::announceStatus(PowerLimiterClass::Status status)
|
|||||||
// otherwise repeat the info with a fixed interval.
|
// otherwise repeat the info with a fixed interval.
|
||||||
if (_lastStatus == status && millis() < _lastStatusPrinted + 10 * 1000) { return; }
|
if (_lastStatus == status && millis() < _lastStatusPrinted + 10 * 1000) { return; }
|
||||||
|
|
||||||
|
// after announcing once that the DPL is disabled by configuration, it
|
||||||
|
// should just be silent while it is disabled.
|
||||||
|
if (status == Status::DisabledByConfig && _lastStatus == status) { return; }
|
||||||
|
|
||||||
MessageOutput.printf("[%11.3f] DPL: %s\r\n",
|
MessageOutput.printf("[%11.3f] DPL: %s\r\n",
|
||||||
static_cast<double>(millis())/1000, getStatusText(status).c_str());
|
static_cast<double>(millis())/1000, getStatusText(status).c_str());
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user