Skip to content

File evaBlinkingIndicator.h

File List > src > evaBlinkingIndicator.h

Go to the documentation of this file

#pragma once

#include "evaIndicator.h"
#include "evaHandler.h"

namespace eva
{
  class BlinkingIndicator : public Indicator, public IHandler
  {
  public:
    using Indicator::Indicator;

    void on();

    void off();

    void on(unsigned short period, unsigned char dutycyclePercent);

  protected:
    void startCycle();

  private:
    void invoke(void *msgSender, CallbackInfo cbInfo) override;

  protected:
    DelayTimer heartbeatTimer;
    DelayTimer dutycycleTimer;
    unsigned short period;
    unsigned char dutycyclePercent;
  };
}