mirror of
https://github.com/Show-maket/IR-protocol.git
synced 2025-06-27 20:59:37 +00:00
enable/disable fix
This commit is contained in:
@ -23,12 +23,14 @@ void IR_Decoder::enable()
|
||||
{
|
||||
dec_list.push_back(this);
|
||||
}
|
||||
pinMode(pin, INPUT_PULLUP);
|
||||
attachInterrupt(pin, (*this)(), CHANGE);
|
||||
}
|
||||
|
||||
void IR_Decoder::disable()
|
||||
{
|
||||
detachInterrupt(pin);
|
||||
pinMode(pin, INPUT);
|
||||
auto &dec_list = get_dec_list();
|
||||
auto it = std::find(dec_list.begin(), dec_list.end(), this);
|
||||
if (it != dec_list.end())
|
||||
|
Reference in New Issue
Block a user