4 #include <InfraredTypes.h> 7 #include <LiquidCrystal_I2C.h> 34 static pin_t physicalLeds[
maxLeds];
40 static bool shouldTimeOut[
maxLeds];
42 static milliseconds_t blinkTime;
45 static unsigned long turnOffTime;
48 static LiquidCrystal_I2C *lcd;
51 static unsigned int lcdRows;
52 static unsigned int lcdColumns;
56 static void setupPhysicalLeds(
const pin_t physicalLeds[
maxLeds]);
57 static void setupShouldTimeOut(
const bool shouldTimeOut[
maxLeds]);
63 static void setupLcdI2c(int8_t i2cAddress, uint8_t columns, uint8_t rows);
68 static void disableTurnOffTime();
70 static void groundPin(pin_t pin) {
72 digitalWrite(pin, LOW);
78 const pin_t physicalLeds[
maxLeds] = NULL,
80 const bool shouldTimeOut[
maxLeds] = NULL);
82 static void setup(int8_t i2cAddress, uint8_t columns, uint8_t rows,
84 pin_t pled3 = invalidPin, pin_t pled4 = invalidPin,
85 pin_t pled5 = invalidPin, pin_t pled6 = invalidPin,
86 pin_t pled7 = invalidPin, pin_t pled8 = invalidPin);
88 void setupPhysicalLeds(pin_t led1 = invalidPin, pin_t led2 = invalidPin,
89 pin_t led3 = invalidPin, pin_t led4 = invalidPin,
90 pin_t led5 = invalidPin, pin_t led6 = invalidPin,
91 pin_t led7 = invalidPin, pin_t led8 = invalidPin);
93 void static lcdPrint(String&
string,
bool clear =
true,
int x = 0,
int y = -1);
94 void static lcdPrint(
const char *str,
bool clear =
true,
int x = 0,
int y = -1) {
99 void static lcdPrint(
const __FlashStringHelper *pstr,
bool clear =
true,
int x = 0,
int y = -1) {
117 lcd->setCursor(x, y);
124 static void allOff(
bool force);
139 static void selfTest(
const char *text);
142 static void selfTest(
const __FlashStringHelper *text);
162 #ifdef SIGNAL_LED_1_GND 163 groundPin(SIGNAL_LED_1_GND);
165 #ifdef SIGNAL_LED_2_GND 168 #ifdef SIGNAL_LED_3_GND 171 #ifdef SIGNAL_LED_4_GND 174 #ifdef SIGNAL_LED_5_GND 177 #ifdef SIGNAL_LED_6_GND 180 #ifdef SIGNAL_LED_7_GND 183 #ifdef SIGNAL_LED_8_GND
static LedState onOffBlinkParse(const char *value)
static const int selftestTimeWithoutLCD
static bool setPhysicalLed(led_t physicalLed, LedState state)
static const int selftestTimeWithLCD
static void setBlinkTime(milliseconds_t value)
static bool setLogicLed(led_t logicLed, const char *state)
static void lcdSetCursor(uint8_t x=0, uint8_t y=0)
static void setup(int8_t i2cAddress=-1, uint8_t columns=defaultLcdColumns, uint8_t rows=defaultLcdRows, const pin_t physicalLeds[maxLeds]=NULL, const led_t logicalLeds[maxLeds]=NULL, const bool shouldTimeOut[maxLeds]=NULL)
Sets up the instance, to be called before using the instance.
static void lcdPrint(const __FlashStringHelper *pstr, bool clear=true, int x=0, int y=-1)
static bool setLogicLed(led_t logicLed, LedState state)
static void setupLedGroundPins()
static bool setupLogicLeds(const led_t array[maxLeds])
static const led_t invalidLed
static void lcdPrint(const char *str, bool clear=true, int x=0, int y=-1)
static void setupShouldTimeout(led_t logicLed, bool state)
static const int defaultLcdRows
static const int defaultLcdColumns
static void lcdPrint(String &string, bool clear=true, int x=0, int y=-1)
static void updateTurnOffTime()
static void allOff(bool force)
static void selfTest(const char *text)
static bool setupLogicLed(led_t loginLed, led_t physicalLed)
static milliseconds_t getBlinkTime()
static void checkTurnoff()
Turn off if it is due.
static const int defaultBlinkTime