mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-28 05:09:40 +00:00
testMultiBlind
This commit is contained in:
14
IR_Encoder.h
14
IR_Encoder.h
@ -10,11 +10,9 @@ class IR_Encoder : IR_FOX {
|
||||
public:
|
||||
|
||||
uint8_t ir_out; /// @brief Вывод передатчика
|
||||
uint16_t addrSelf; /// @brief Адрес передатчика
|
||||
uint16_t id; /// @brief Адрес передатчика
|
||||
|
||||
private:
|
||||
uint8_t carrierTune; /// @brief Подстройка несущей частоты
|
||||
uint8_t halfPeriod; /// @brief полупериод несущей частоты
|
||||
|
||||
public:
|
||||
|
||||
@ -23,7 +21,7 @@ public:
|
||||
/// @param pin Вывод передатчика
|
||||
/// @param tune Подстройка несущей частоты
|
||||
/// @param decPair Приёмник, для которого отключается приём в момент передачи передатчиком
|
||||
IR_Encoder(uint16_t addr, uint8_t pin, uint8_t tune, IR_Decoder* decPair = nullptr);
|
||||
IR_Encoder(uint16_t addr, uint8_t pin, uint8_t decPairCount = 0, void* decPair = nullptr);
|
||||
|
||||
template<typename T>
|
||||
void sendData(uint16_t addrTo, T& data, bool needAccept = false);
|
||||
@ -36,7 +34,7 @@ public:
|
||||
~IR_Encoder();
|
||||
volatile bool ir_out_virtual;
|
||||
private:
|
||||
IR_Decoder* decoder;
|
||||
void IR_Encoder::setDecoder_isSending();
|
||||
void _sendData(uint16_t addrTo, uint8_t* data, uint8_t len, uint8_t msgType);
|
||||
void sendByte(uint8_t byte, bool* prev, bool LOW_FIRST);
|
||||
void addSync(bool* prev, bool* next);
|
||||
@ -51,13 +49,13 @@ private:
|
||||
sync = 3
|
||||
};
|
||||
|
||||
IR_Decoder* decoders;
|
||||
uint8_t decodersCount;
|
||||
|
||||
uint8_t sendLen;
|
||||
uint8_t sendBuffer[dataByteSizeMax] { 0 }; /// @brief Буффер данных для отправки
|
||||
// uint8_t
|
||||
|
||||
volatile bool isSending = false;
|
||||
// volatile bool genState = HIGH;
|
||||
|
||||
volatile bool state; /// @brief Текущий уровень генерации
|
||||
|
||||
volatile uint8_t dataByteCounter;
|
||||
|
Reference in New Issue
Block a user