diff --git a/src/SigLed.h b/src/SigLed.h index bb9b134..cccdec9 100644 --- a/src/SigLed.h +++ b/src/SigLed.h @@ -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 };