3 #include <InfraredTypes.h>
32 static unsigned int row;
33 static unsigned int column;
36 static pin_t physicalLeds[
maxLeds];
42 static bool shouldTimeOut[
maxLeds];
44 static milliseconds_t blinkTime;
47 static unsigned long turnOffTime;
53 static unsigned int lcdRows;
54 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);
66 static void disableTurnOffTime();
68 static void groundPin(pin_t pin) {
70 digitalWrite(pin, LOW);
73 static void prepare(
bool clean,
int x,
int y);
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);
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);
95 lcdPrint(
string.c_str(), clear, x, y);
98 void static lcdPrint(
const __FlashStringHelper *pstr,
bool clear =
true,
int x = 0,
int y =
invalidLine);
109 static void allOff(
bool force);
124 static void selfTest(
const char *text);
126 static void selfTest(
const __FlashStringHelper *text);
145 #ifdef SIGNAL_LED_1_GND
146 groundPin(SIGNAL_LED_1_GND);
148 #ifdef SIGNAL_LED_2_GND
151 #ifdef SIGNAL_LED_3_GND
154 #ifdef SIGNAL_LED_4_GND
157 #ifdef SIGNAL_LED_5_GND
160 #ifdef SIGNAL_LED_6_GND
163 #ifdef SIGNAL_LED_7_GND
166 #ifdef SIGNAL_LED_8_GND
Functions for deploying I2C LCD displays.
static constexpr int defaultBlinkTime
static void setBlinkTime(milliseconds_t value)
static void lcdPrint(const char *str, bool clear=true, int x=invalidLine, int y=invalidLine)
static void lcdPrint(const __FlashStringHelper *pstr, bool clear=true, int x=0, int y=invalidLine)
static constexpr int maxLeds
static constexpr int defaultLcdColumns
static void setupShouldTimeout(led_t logicLed, bool state)
static milliseconds_t getBlinkTime()
static constexpr int selftestTimeWithLCD
static void allOff(bool force)
static void lcdPrint(String &string, bool clear=true, int x=invalidLine, int y=invalidLine)
static void setupLedGroundPins()
static constexpr led_t invalidLed
static bool setLogicLed(led_t logicLed, LedState state)
static bool setLogicLed(led_t logicLed, const char *state)
static LedState onOffBlinkParse(const char *value)
static constexpr int selftestTimeWithoutLCD
static bool setupLogicLed(led_t loginLed, led_t physicalLed)
void setupPhysicalLeds(pin_t led1=invalidPin, pin_t led2=invalidPin, pin_t led3=invalidPin, pin_t led4=invalidPin, pin_t led5=invalidPin, pin_t led6=invalidPin, pin_t led7=invalidPin, pin_t led8=invalidPin)
static void lcdSetCursor(uint8_t x=0, uint8_t y=0)
static void setup(int8_t i2cAddress, 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 bool setupLogicLeds(const led_t array[maxLeds])
static constexpr int invalidLine
static void selfTest(const char *text)
static bool setPhysicalLed(led_t physicalLed, LedState state)
static void setup(int8_t i2cAddress, uint8_t columns, uint8_t rows, pin_t pled1, pin_t pled2=invalidLed, pin_t pled3=invalidPin, pin_t pled4=invalidPin, pin_t pled5=invalidPin, pin_t pled6=invalidPin, pin_t pled7=invalidPin, pin_t pled8=invalidPin)
static void updateTurnOffTime()
static void checkTurnoff()
Turn off if it is due.
static constexpr int defaultLcdRows
void setCursor(uint8_t, uint8_t)