debug startRX and m

This commit is contained in:
2024-02-15 16:50:21 +03:00
parent 408fea84ac
commit b517e4e6ad
5 changed files with 88 additions and 67 deletions

View File

@ -6,7 +6,6 @@
class IR_Decoder;
class IR_Encoder : IR_FOX {
friend IR_Decoder;
friend void isr(IR_Encoder& e);
public:
uint16_t id; /// @brief Адрес передатчика
@ -35,7 +34,7 @@ public:
TCCR2B |= (1 << CS20); // Предделитель 1
TIMSK2 |= (1 << OCIE2A); // Прерывание по совпадению
#if F_CPU == 16000000
OCR2A = /* 465 */((F_CPU / (38000*2)) - 2); //38кГц
OCR2A = /* 465 */((F_CPU / (38000 * 2)) - 2); //38кГц
#elif F_CPU == 8000000
OCR2A = ((F_CPU / (38000 * 2)) - 2); //38кГц Частота_мк / (Предделитель * Частота * 2)
#endif
@ -56,7 +55,6 @@ public:
volatile bool ir_out_virtual;
private:
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);
void send_HIGH(bool = 1);