This commit is contained in:
2024-02-22 16:52:55 +03:00
parent 6f5bbac83c
commit e35bf7ae23
7 changed files with 124 additions and 46 deletions

View File

@ -1,33 +1,45 @@
#pragma once
#include "IR_config.h"
// class IR_Decoder
#include "IR_DecoderRaw.h"
#include "PacketTypes.h"
class IR_Decoder : public IR_DecoderRaw {
public:
IR_Decoder(const uint8_t isrPin, uint16_t addr, IR_Encoder* encPair = nullptr) :
IR_DecoderRaw(isrPin, addr, encPair),
gotData(Data(&packInfo)) {
}
Data gotData;
void tick() {
IR_DecoderRaw::tick();
if (available()) {
Serial.println("PARSING RAW DATA");
switch (packInfo.buffer[0] & IR_MASK_MSG_TYPE) {
case IR_MSG_DATA_NOACCEPT:
break;
case IR_MSG_DATA_ACCEPT:
break;
case IR_MSG_BACK:
break;
case IR_MSG_BACK_TO:
break;
case IR_MSG_REQUEST:
break;
case IR_MSG_ACCEPT:
break;
default:
break;
}
}
}
};