Arduino C++ Library for VLCB
Loading...
Searching...
No Matches
LEDUserInterface.h
Go to the documentation of this file.
1// Copyright (C) Sven Rosvall (sven@rosvall.ie)
2// This file is part of VLCB-Arduino project on https://github.com/SvenRosvall/VLCB-Arduino
3// Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
4// The full licence can be found at: http://creativecommons.org/licenses/by-nc-sa/4.0/
5
6#pragma once
7
8#include "LED.h"
9#include "Switch.h"
10#include "Service.h"
11#include "vlcbdefs.hpp"
12
13namespace VLCB
14{
23{
24public:
25 LEDUserInterface(byte greenLedPin, byte yellowLedPin, byte pushButtonPin);
26
28 virtual VlcbServiceTypes getServiceID() const override { return SERVICE_ID_NONE; };
29 virtual byte getServiceVersionID() const override { return 1; };
30
31 bool isButtonPressed();
32 virtual void process() override;
33 virtual void processAction(const Action &action) override;
35
36private:
37 LED greenLed;
38 LED yellowLed;
39 Switch pushButton;
40
41 bool resetRequested();
42 void handleAction(const Action &action);
43 void checkRequestedAction();
44
45 void indicateMode(VlcbModeParams mode);
46};
47
48}
LEDUserInterface(byte greenLedPin, byte yellowLedPin, byte pushButtonPin)
Interface base class for all VLCB services.
Definition Service.h:25
Definition VLCB.h:50
void process()
VlcbModeParams
Definition vlcbdefs.hpp:562
VlcbServiceTypes
Definition vlcbdefs.hpp:487
@ SERVICE_ID_NONE
Definition vlcbdefs.hpp:491