move ct conversion counter
This commit is contained in:
parent
3a9488d4f8
commit
199a89a700
2 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,7 @@ void CurrentTransformerCard::loop()
|
|||
if (this->lastConversionTime == 0) {
|
||||
this->lastConversionTime = millis();
|
||||
}
|
||||
static uint32_t lastConversionLoopTime = 0;
|
||||
|
||||
if (millis() - lastConversionLoopTime > this->conversionInterval) {
|
||||
this->beginConversion();
|
||||
lastConversionLoopTime = millis();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue