Este repositorio está archivado. Usted puede ver los archivos y clonarlos, pero no puede hace push o abrir incidencias o pull requests.
2016-07-18 02:03:03 +00:00
|
|
|
#ifndef LAYERSTATE_LED_H
|
|
|
|
#define LAYERSTATE_LED_H
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <LayerState.h>
|
|
|
|
#include <LED.h>
|
|
|
|
|
|
|
|
/* Basic LayerState with layer LED indictor lights.
|
|
|
|
begin() should be called once to turn on LED for initial active layer.
|
|
|
|
*/
|
|
|
|
class LayerState_LED : public LayerState
|
|
|
|
{
|
|
|
|
private:
|
2016-09-20 01:46:03 +00:00
|
|
|
LED*const *const ptrsLEDs; //array of LEDs, where layerId is array index
|
|
|
|
virtual void setActiveLayer(const uint8_t layerId);//set active layerId and turn on it's LED
|
2016-07-18 02:03:03 +00:00
|
|
|
public:
|
|
|
|
LayerState_LED(LED*const ptrsLEDs[]): ptrsLEDs(ptrsLEDs) {}
|
|
|
|
void begin();
|
|
|
|
};
|
|
|
|
#endif
|