This commit is contained in:
2024-05-27 10:53:44 +03:00
parent 2147bf0788
commit e8e2cd60c2
6 changed files with 60 additions and 42 deletions

View File

@ -4,6 +4,7 @@
IR_DecoderRaw::IR_DecoderRaw(const uint8_t pin, uint16_t addr, IR_Encoder *encPair) : encoder(encPair)
{
setPin(pin);
pinMode(pin, INPUT_PULLUP);
id = addr;
prevRise = prevFall = prevPrevFall = prevPrevRise = 0;
if (encPair != nullptr)
@ -74,7 +75,8 @@ void IR_DecoderRaw::isr()
oldTime = time_;
FrontStorage edge;
edge.dir = port->IDR & mask;
// edge.dir = port->IDR & mask;
edge.dir = digitalRead(pin);
edge.time = time_;
subBuffer.push(edge);