mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-28 05:09:40 +00:00
addr check flag added
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
#define IRDEBUG_INFO
|
||||
/*//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Для работы в паре положить декодер в энкодер
|
||||
@ -38,7 +40,7 @@ msg type:
|
||||
// | xxx..... | = тип сообщения
|
||||
// | ...xxxxx | = длина (максимум 31 бита)
|
||||
// ---------- */
|
||||
#define IR_MSG_BACK 0U // | 000..... | = Задний сигнал машинки
|
||||
#define IR_MSG_BACK 0U // | 0000B.... | = Задний сигнал машинки
|
||||
;// // | \\\x---- | = нужна ли адресация
|
||||
;// // | \\\-xxxx | = длина данных (Равна нулю при отсутствии сквозных команд)
|
||||
#define IR_MSG_ACCEPT 1U // | 001..... | = подтверждение
|
||||
@ -173,8 +175,9 @@ public:
|
||||
protected:
|
||||
ErrorsStruct errors;
|
||||
|
||||
void checkaddressRuleApply(uint16_t &address, uint16_t &id, bool &flag) {
|
||||
void checkaddressRuleApply(uint16_t address, uint16_t id, bool &flag) {
|
||||
flag = false;
|
||||
flag |= id == 0;
|
||||
flag |= address == id;
|
||||
flag |= address >= IR_Broadcast;
|
||||
}
|
||||
|
Reference in New Issue
Block a user