This commit is contained in:
DashyFox 2024-04-24 10:35:55 +03:00
parent 96f0ac623e
commit 373cd43b73
2 changed files with 5 additions and 3 deletions

View File

@ -13,7 +13,7 @@ std::list<IR_Encoder*>& IR_Encoder::get_enc_list() // определение ф
IR_Encoder::IR_Encoder(uint8_t pin, uint16_t addr, IR_DecoderRaw *decPair)
{
this->pin = pin;
setPin(pin);
id = addr;
this->decPair = decPair;
signal = noSignal;
@ -255,7 +255,9 @@ void IR_Encoder::_isr()
return;
ir_out_virtual = !ir_out_virtual && state;
digitalWrite(pin, ir_out_virtual);
port->ODR &= ~(mask);
port->ODR |= mask & (ir_out_virtual ? (uint16_t)0xFFFF : (uint16_t)0x0000);
if (toggleCounter)

View File

@ -11,8 +11,8 @@ class IR_Encoder : IR_FOX
public:
private:
uint16_t id; /// @brief Адрес передатчика
uint8_t pin;
public:
/// @brief Класс передатчика
/// @param addr Адрес передатчика
/// @param pin Вывод передатчика