default constructor and operator() for test

This commit is contained in:
2024-08-28 18:00:18 +03:00
parent c66d47e464
commit 784365181e
6 changed files with 16 additions and 7 deletions

View File

@ -11,6 +11,8 @@ std::list<IR_Encoder*>& IR_Encoder::get_enc_list() // определение ф
return dec_list; // возвращается ссылка на переменную
}
IR_Encoder::IR_Encoder(){};
IR_Encoder::IR_Encoder(uint8_t pin, uint16_t addr, IR_DecoderRaw *decPair)
{
setPin(pin);
@ -46,8 +48,6 @@ void IR_Encoder::setBlindDecoders(IR_DecoderRaw *decoders[], uint8_t count)
IR_Encoder::~IR_Encoder()
{
delete[] bitLow;
delete[] bitHigh;
get_enc_list().remove(this);
};
@ -392,10 +392,10 @@ void IR_Encoder::addSync(bool *prev, bool *next)
}
}
uint8_t* IR_Encoder::bitHigh = new uint8_t[2]{
uint8_t IR_Encoder::bitHigh[2] = {
(bitPauseTakts) * 2 - 1,
(bitActiveTakts) * 2 - 1};
uint8_t* IR_Encoder::bitLow = new uint8_t[2]{
uint8_t IR_Encoder::bitLow[2] = {
(bitPauseTakts/2 + bitActiveTakts) * 2 - 1,
(bitPauseTakts) - 1};