mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 19:26:37 +00:00
Merge pull request #15880 from curzon01/fix-flowmeter
Fix single sensor exception
This commit is contained in:
commit
fdebf32562
@ -104,8 +104,10 @@ void FlowRateMeterInit(void)
|
|||||||
|
|
||||||
flowratemeter_valuesread = false;
|
flowratemeter_valuesread = false;
|
||||||
for (uint32_t i = 0; i < MAX_FLOWRATEMETER; i++) {
|
for (uint32_t i = 0; i < MAX_FLOWRATEMETER; i++) {
|
||||||
pinMode(Pin(GPIO_FLOWRATEMETER_IN, i), INPUT);
|
if (PinUsed(GPIO_FLOWRATEMETER_IN, i)) {
|
||||||
attachInterrupt(Pin(GPIO_FLOWRATEMETER_IN, i), irq_service[i], RISING);
|
pinMode(Pin(GPIO_FLOWRATEMETER_IN, i), INPUT);
|
||||||
|
attachInterrupt(Pin(GPIO_FLOWRATEMETER_IN, i), irq_service[i], RISING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user