Moznost invertovat vystup na LED

This commit is contained in:
Pavel Brychta 2022-06-25 17:48:43 +02:00
parent c6c8c70af2
commit 66acdd9805

View File

@ -51,6 +51,8 @@ protected:
LS_RUN, // bezi automat
LS_WAIT, // cekame v automatu
} _state; // stav automatu
bool _invert = false;
void _init(void);
public:
@ -58,6 +60,16 @@ public:
void set(const uint8_t *signal);
void set_P(PGM_P signal);
void start(void);
void setInvert(bool invert)
{
if (_invert != invert) {
_invert = invert;
int temp = _ledon;
_ledon = _ledoff;
_ledoff = temp;
}
}
static void lh(SigLED *ptr);
void rtLed(void); // vykonna metoda
};