From ea63c5e4801c15dc93050cf94dde34355a8281e2 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov
Date: Sun, 7 Nov 2021 17:56:28 +0300
Subject: [PATCH 001/402] fix opentherm
---
tasmota/xsns_69_opentherm.ino | 20 ++++++++++++++++--
tasmota/xsns_69_opentherm_protocol.ino | 29 ++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/tasmota/xsns_69_opentherm.ino b/tasmota/xsns_69_opentherm.ino
index cfcc0384d..c94e61b59 100644
--- a/tasmota/xsns_69_opentherm.ino
+++ b/tasmota/xsns_69_opentherm.ino
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#define USE_OPENTHERM
#ifdef USE_OPENTHERM
@@ -467,8 +468,11 @@ uint8_t sns_opentherm_read_flags(char *data, uint32_t len)
// flag value, however, this command does not update the settings.
#define D_CMND_SET_HOT_WATER_ENABLED "dhw"
+// BLOR - Reset boiler
+#define D_CMND_BLLOR "blor"
+
const char kOpenThermCommands[] PROGMEM = D_PRFX_OTHERM "|" D_CMND_OTHERM_BOILER_SETPOINT "|" D_CMND_OTHERM_DHW_SETPOINT
- "|" D_CMND_OTHERM_SAVE_SETTINGS "|" D_CMND_OTHERM_FLAGS "|" D_CMND_SET_CENTRAL_HEATING_ENABLED "|" D_CMND_SET_HOT_WATER_ENABLED;
+ "|" D_CMND_OTHERM_SAVE_SETTINGS "|" D_CMND_OTHERM_FLAGS "|" D_CMND_SET_CENTRAL_HEATING_ENABLED "|" D_CMND_SET_HOT_WATER_ENABLED "|" D_CMND_BLLOR;
void (*const OpenThermCommands[])(void) PROGMEM = {
&sns_opentherm_boiler_setpoint_cmd,
@@ -476,7 +480,8 @@ void (*const OpenThermCommands[])(void) PROGMEM = {
&sns_opentherm_save_settings_cmd,
&sns_opentherm_flags_cmd,
&sns_opentherm_set_central_heating_cmd,
- &sns_opentherm_set_hot_water_cmd};
+ &sns_opentherm_set_hot_water_cmd,
+ &sns_opentherm_blor_cmd,};
void sns_opentherm_cmd(void) { }
void sns_opentherm_boiler_setpoint_cmd(void)
@@ -550,6 +555,17 @@ void sns_opentherm_set_hot_water_cmd(void)
ResponseCmndNumber(sns_ot_boiler_status.m_enableHotWater ? 1 : 0);
}
+void sns_opentherm_blor_cmd(void)
+{
+ bool query = strlen(XdrvMailbox.data) == 0;
+ bool retval = false;
+ if (!query)
+ {
+ if (atoi(XdrvMailbox.data)) retval = sns_opentherm_call_blor();
+ }
+ ResponseCmndNumber(retval);
+}
+
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
diff --git a/tasmota/xsns_69_opentherm_protocol.ino b/tasmota/xsns_69_opentherm_protocol.ino
index bc821640a..a86648849 100644
--- a/tasmota/xsns_69_opentherm_protocol.ino
+++ b/tasmota/xsns_69_opentherm_protocol.ino
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#define USE_OPENTHERM
#ifdef USE_OPENTHERM
@@ -243,6 +244,14 @@ OpenThermCommand sns_opentherm_commands[] = {
.m_ot_make_request = sns_opentherm_get_generic_u16,
.m_ot_parse_response = sns_opentherm_parse_generic_u16,
.m_ot_appent_telemetry = sns_opentherm_tele_generic_u16},
+ {// Boiler Lock-out Reset command
+ .m_command_name = "BLOR",
+ .m_command_code = (uint8_t)OpenThermMessageID::Command,
+ .m_flags = {.notSupported = 1},
+ .m_results = {{.m_u8 = 0}, {.m_u8 = 0}},
+ .m_ot_make_request = sns_opentherm_send_blor,
+ .m_ot_parse_response = sns_opentherm_parse_generic_u16,
+ .m_ot_appent_telemetry = sns_opentherm_tele_u8_u8},
};
/////////////////////////////////// Process Slave Status Flags & Control //////////////////////////////////////////////////
@@ -431,6 +440,26 @@ void sns_opentherm_tele_oem_diag(struct OpenThermCommandT *self)
ResponseAppend_P(PSTR("%d"), (int)self->m_results[0].m_u16);
}
+/////////////////////////////////// Boiler Boiler Lock-out Reset //////////////////////////////////////////////////
+unsigned long sns_opentherm_send_blor(struct OpenThermCommandT *self, struct OT_BOILER_STATUS_T *status)
+{
+ AddLog(LOG_LEVEL_ERROR, PSTR("[OTH]: Boiler Boiler Lock-out Reset"));
+
+ self->m_flags.notSupported = true; // Disable future calls of this command
+
+ unsigned int data = 1; //1 : “BLOR”= Boiler Lock-out Reset command
+ return OpenTherm::buildRequest(OpenThermMessageType::WRITE_DATA, OpenThermMessageID::Command, data);
+}
+bool sns_opentherm_call_blor()
+{
+ /*
+ OpenThermCommandT *cmd = &sns_opentherm_commands[sns_opentherm_current_command-1];
+ if (strcmp(cmd->m_command_name, "BLOR")) return false;
+ cmd->m_flags.notSupported = false;
+ return true;
+ */
+}
+
/////////////////////////////////// Generic Single Float /////////////////////////////////////////////////
unsigned long sns_opentherm_get_generic_float(struct OpenThermCommandT *self, struct OT_BOILER_STATUS_T *)
{
From f6211a416bc0d1b1a30f5f2d0c593a4ee9ccbbc2 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov
Date: Sun, 7 Nov 2021 17:59:03 +0300
Subject: [PATCH 002/402] fix opentherm
---
tasmota/xlgt_01_ws2812.ino | 99 +++++++++++++++++++++++++++++++++++++-
1 file changed, 98 insertions(+), 1 deletion(-)
diff --git a/tasmota/xlgt_01_ws2812.ino b/tasmota/xlgt_01_ws2812.ino
index a7e7c9927..465aba427 100644
--- a/tasmota/xlgt_01_ws2812.ino
+++ b/tasmota/xlgt_01_ws2812.ino
@@ -17,6 +17,11 @@
along with this program. If not, see .
*/
+#ifndef FIRMWARE_MINIMAL
+#define USE_LIGHT
+#define USE_WS2812
+#endif
+
#ifdef USE_LIGHT
#ifdef USE_WS2812
/*********************************************************************************************\
@@ -37,7 +42,7 @@
#define XLGT_01 1
-const uint8_t WS2812_SCHEMES = 8; // Number of WS2812 schemes
+const uint8_t WS2812_SCHEMES = 10; // Number of WS2812 schemes
const char kWs2812Commands[] PROGMEM = "|" // No prefix
D_CMND_LED "|" D_CMND_PIXELS "|" D_CMND_ROTATION "|" D_CMND_WIDTH ;
@@ -289,6 +294,93 @@ void Ws2812Clock(void)
Ws2812StripShow();
}
+#define pow2(x) ((x)*(x))
+#define pow3(x) ((x)*pow2(x))
+#define pow4(x) (pow2(x)*pow2(x))
+
+void Ws2812RunningStrip(int scheme)
+{
+#if (USE_WS2812_CTYPE > NEO_3LED)
+ RgbwColor c;
+ c.W = 0;
+#else
+ RgbColor c(Settings->light_dimmer);
+#endif
+
+ static uint32_t timer_counter = 0;
+ static uint32_t last_timer_counter = timer_counter;
+ if (Settings->light_rotation%2) timer_counter--;
+ else timer_counter++;
+
+ uint32_t width = Settings->ws_width[WS_MINUTE]?Settings->ws_width[WS_MINUTE]:1;
+ uint32_t repeat = 1;//kWsRepeat[Settings->light_width]; // number of scheme.count per ledcount
+ uint32_t range = (uint32_t)ceil((float)Settings->light_pixels / (float)repeat);
+ uint32_t speed = Settings->light_speed; //((Settings->light_speed * 2) -1) * (STATES / 10); //
+ static uint32_t offset = 0;
+
+ if (scheme==WS2812_SCHEMES-1) {
+ if (timer_counter/speed!=last_timer_counter/speed) {
+ offset = random(range);
+ last_timer_counter = timer_counter;
+ }
+ } else {
+ offset = speed > 0 ? timer_counter / speed : 0;
+ }
+
+ //WsColor oldColor, currentColor;
+ //Ws2812GradientColor(schemenr, &oldColor, range, gradRange, offset);
+ //currentColor = oldColor;
+ int power = Settings->ws_width[WS_SECOND];
+ int max_input = pow(width, power);
+ float dimmer = 100 / (float)Settings->light_dimmer;
+
+ uint32_t target = offset % Settings->light_pixels;
+
+ for (uint32_t i = 0; i < Settings->light_pixels; i++) {
+ int delta = targetlight_color[0] / pow(delta+1, power);
+ float fmyGrn = Settings->light_color[1] / pow(delta+1, power);
+ float fmyBlu = Settings->light_color[2] / pow(delta+1, power);
+ /*
+ float fmyRed = (float)wsmap(max_input-pow(delta+1, power), 0, max_input, 0, Settings->light_color[0]);
+ float fmyGrn = (float)wsmap(max_input-pow(delta+1, power), 0, max_input, 0, Settings->light_color[1]);
+ float fmyBlu = (float)wsmap(max_input-pow(delta+1, power), 0, max_input, 0, Settings->light_color[2]);
+ */
+
+ c.R = (uint8_t)fmyRed/dimmer;
+ c.G = (uint8_t)fmyGrn/dimmer;
+ c.B = (uint8_t)fmyBlu/dimmer;
+ }
+ else {
+ c.R = 0 ;
+ c.G = 0 ;
+ c.B = 0 ;
+ }
+
+ if (Settings->light_width==2) {
+ c.R = Settings->light_color[0]/dimmer - c.R;
+ c.G = Settings->light_color[1]/dimmer - c.G;
+ c.B = Settings->light_color[2]/dimmer - c.B;
+ } else if (Settings->ws_width[WS_MINUTE]==3) {
+ c.R = max(100 - c.R,0);
+ c.G = max(100 - c.G,0);
+ c.B = max(100 - c.B,0);
+ }
+
+ strip->SetPixelColor(i, c);
+/*
+ // Blend old and current color based on time for smooth movement.
+ c.R = wsmap(Light.strip_timer_counter % speed, 0, speed, oldColor.red, currentColor.red);
+ c.G = wsmap(Light.strip_timer_counter % speed, 0, speed, oldColor.green, currentColor.green);
+ c.B = wsmap(Light.strip_timer_counter % speed, 0, speed, oldColor.blue, currentColor.blue);
+ strip->SetPixelColor(i, c);
+ oldColor = currentColor;
+ */
+ }
+ Ws2812StripShow();
+}
+
void Ws2812GradientColor(uint32_t schemenr, struct WsColor* mColor, uint32_t range, uint32_t gradRange, uint32_t i)
{
/*
@@ -495,6 +587,11 @@ void Ws2812ShowScheme(void)
Ws2812.show_next = 0;
}
break;
+ case WS2812_SCHEMES-2: // Running strip
+ case WS2812_SCHEMES-1: // Running strip
+ Ws2812RunningStrip(scheme);
+ Ws2812.show_next = 1;
+ break;
default:
if (1 == Settings->light_fade) {
Ws2812Gradient(scheme -1);
From e5d176f6f42b7dcaaa587d69092b12a18e8ffe68 Mon Sep 17 00:00:00 2001
From: Michael
Date: Fri, 19 Nov 2021 11:45:07 +0100
Subject: [PATCH 003/402] init first LED
---
tasmota/xdsp_19_max7219_matrix.ino | 275 +++++++++++++++++++++++++++++
1 file changed, 275 insertions(+)
create mode 100644 tasmota/xdsp_19_max7219_matrix.ino
diff --git a/tasmota/xdsp_19_max7219_matrix.ino b/tasmota/xdsp_19_max7219_matrix.ino
new file mode 100644
index 000000000..97c20f00b
--- /dev/null
+++ b/tasmota/xdsp_19_max7219_matrix.ino
@@ -0,0 +1,275 @@
+/*
+ xdsp_19_max7219_matrix.ino.ino - Support for MAX7219 based dot matrix displays for Tasmota
+
+ Copyright (C) 2021 Michael Beuss
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifdef USE_DISPLAY
+#ifdef USE_DISPLAY_MAX7219_MATRIX
+/*********************************************************************************************\
+ This driver enables the display of ascii text on MAX7219 based LED dot matrix modules.
+
+ Connect the MAX7219 display module's pins to any free GPIOs of the ESP8266 or ESP32 module
+ and assign the pins as follows from Tasmota's GUI:
+
+ DIN hardware pin --> "MAX7219 DIN"
+ CS hardware pin --> "MAX7219 CS"
+ CLK hardware pin --> "MAX7219 CLK"
+
+ Once the GPIO configuration is saved and the ESP8266/ESP32 module restarts,
+ set the Display Model to 19 and Display Mode to 0
+ using the command "Backlog DisplayModel 15 ; DisplayMode 0"
+
+ If your display is a TM1637 with 6 digits, set Display Width to the number of digits your
+ display has, using the command "DisplayWidth 6".
+
+ After the ESP8266/ESP32 module restarts again, turn ON the display with the command "Power 1"
+
+ Now, the following "Display" commands can be used:
+
+
+ DisplayClear
+
+ Clears the display, command: "DisplayClear"
+
+
+ DisplayNumber num [,position {0-(Settings->display_width-1))} [,leading_zeros {0|1} [,length {1 to Settings->display_width}]]]
+
+ Clears and then displays number without decimal. command e.g., "DisplayNumber 1234"
+ Control 'leading zeros', 'length' and 'position' with "DisplayNumber 1234, , , "
+ 'leading zeros' can be 1 or 0 (default), 'length' can be 1 to Settings->display_width, 'position' can be 0 (left-most) to Settings->display_width (right-most).
+ See function description below for more details.
+
+ DisplayNumberNC num [,position {0-(Settings->display_width-1))} [,leading_zeros {0|1} [,length {1 to Settings->display_width}]]]
+
+ Display integer number as above, but without clearing first. e.g., "DisplayNumberNC 1234". Usage is same as above.
+
+
+
+ DisplayFloat num [,position {0-(Settings->display_width-1)} [,precision {0-Settings->display_width} [,length {1 to Settings->display_width}]]]
+
+ Clears and then displays float (with decimal point) command e.g., "DisplayFloat 12.34"
+ See function description below for more details.
+
+
+
+ DisplayFloatNC num [,position {0-(Settings->display_width-1)} [,precision {0-Settings->display_width} [,length {1 to Settings->display_width}]]]
+
+ Displays float (with decimal point) as above, but without clearing first. command e.g., "DisplayFloatNC 12.34"
+ See function description below for more details.
+
+
+
+ DisplayRaw position {0-(Settings->display_width-1)},length {1 to Settings->display_width}, num1 [, num2[, num3[, num4[, ...upto Settings->display_width numbers]]]]]
+
+ Takes upto Settings->display_width comma-separated integers (0-255) and displays raw segments. Each number represents a
+ 7-segment digit. Each 8-bit number represents individual segments of a digit.
+ For example, the command "DisplayRaw 0, 4, 255, 255, 255, 255" would display "[8.8.8.8.]"
+
+
+
+ DisplayText text [, position {0-(Settings->display_width-1)} [,length {1 to Settings->display_width}]]
+
+ Clears and then displays basic text. command e.g., "DisplayText ajith vasudevan"
+ Control 'length' and 'position' with "DisplayText , , "
+ 'length' can be 1 to Settings->display_width, 'position' can be 0 (left-most) to Settings->display_width-1 (right-most)
+ A caret(^) symbol in the text input is dispayed as the degrees(°) symbol. This is useful for displaying Temperature!
+ For example, the command "DisplayText 22.5^" will display "22.5°".
+
+
+ DisplayTextNC text [, position {0-Settings->display_width-1} [,length {1 to Settings->display_width}]]
+
+ Clears first, then displays text. Usage is same as above.
+
+
+
+ DisplayScrollText text [, num_loops]
+
+ Displays scrolling text indefinitely, until another Display- command (other than DisplayScrollText
+ or DisplayScrollDelay is issued). Optionally, stop scrolling after num_loops iterations.
+
+
+
+ DisplayScrollDelay delay {0-15} // default = 4
+
+ Sets the speed of text scroll. Smaller delay = faster scrolling.
+
+
+
+ DisplayLevel num {0-100}
+
+ Display a horizontal bar graph (0-100) command e.g., "DisplayLevel 50" will display [|||| ]
+
+
+
+ DisplayClock 1|2|0
+
+ Displays a clock.
+ Commands "DisplayClock 1" // 12 hr format
+ "DisplayClock 2" // 24 hr format
+ "DisplayClock 0" // turn off clock
+
+
+In addition, setting DisplayMode to 1 shows the time, setting it to 2 shows the date
+and setting it to 3 alternates between time and date.
+
+
+
+\*********************************************************************************************/
+
+#define XDSP_19 19
+#define CMD_MAX_LEN 55
+
+
+#include
+
+LedControl *max7219_Matrix;
+bool max2791Matrix_init_done = false;
+byte modulesPerRow = 4;
+
+
+bool MAX7291Matrix_init(void)
+{
+ if (!PinUsed(GPIO_MAX7219DIN) || !PinUsed(GPIO_MAX7219CLK) || !PinUsed(GPIO_MAX7219CS))
+ {
+ AddLog(LOG_LEVEL_INFO, PSTR("DSP: MAX7291Matrix_init GPIO pins missing DIN, CLK or CS"));
+ return false; // ensure necessariy pins are configurated
+ }
+
+ Settings->display_model = XDSP_19;
+ Settings->display_cols[0] = Settings->display_width;
+ Settings->display_height = 1;
+ Settings->display_rows = Settings->display_height;
+ max7219_Matrix = new LedControl(Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), modulesPerRow);
+ MAX7291Matrix_On(true);
+ MAX7291Matrix_Clear();
+ MAX7291Matrix_Dim();
+ AddLog(LOG_LEVEL_INFO, PSTR("DSP: MAX7291Matrix_init"));
+ max2791Matrix_init_done = true;
+
+ max7219_Matrix->setLed(0, 3, 3, true);
+ AddLog(LOG_LEVEL_INFO, PSTR("DSP: setLed 3,3"));
+ return true;
+}
+
+bool MAX7291Matrix_On( bool on )
+{
+ for (int addr = 0; addr < modulesPerRow; addr++)
+ {
+ max7219_Matrix->shutdown (addr, !on); // false: on, true: off
+ }
+ AddLog(LOG_LEVEL_INFO, PSTR("MTX: On %d"), on);
+ return true;
+
+}
+
+bool MAX7291Matrix_Dim(void)
+{
+ int dim = GetDisplayDimmer16();
+ for (int addr = 0; addr < modulesPerRow; addr++)
+ {
+ max7219_Matrix->setIntensity(addr, dim); // 1..15
+ }
+ AddLog(LOG_LEVEL_INFO, PSTR("DSP: Dim %d"), dim);
+ return true;
+}
+
+// /*********************************************************************************************\
+// * Clears the display
+// * Command: DisplayClear
+// \*********************************************************************************************/
+bool MAX7291Matrix_Clear(void)
+{
+ for(int addr=0; addrclearDisplay(addr);
+ }
+ AddLog(LOG_LEVEL_INFO, PSTR("DSP: Clear"));
+ return true;
+}
+
+// /*********************************************************************************************\
+// * Clears the display
+// * Command: DisplayText
+// \*********************************************************************************************/
+bool MAX7291Matrix_Text()
+{
+ char sString[CMD_MAX_LEN + 1];
+ subStr(sString, XdrvMailbox.data, ",", 1);
+ MAX7291Matrix_Clear;
+ AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: sString %s"), sString);
+
+ // test
+ uint8_t length = strlen(sString);
+ //if(length > modulesPerRow)
+ length = modulesPerRow;
+
+ for(int addr = 0; addrsetLed(addr, 0, 1, true);
+ AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: setLed() %d, 0, 1)"), addr);
+ }
+
+ return true;
+}
+
+bool Xdsp19(uint8_t function)
+{
+ bool result = false;
+
+
+ if (FUNC_DISPLAY_INIT_DRIVER == function)
+ {
+ result = MAX7291Matrix_init();
+ }
+ else{
+ //if (max2791Matrix_init_done && (XDSP_19 == Settings->display_model)) {
+ switch (function) {
+ case FUNC_DISPLAY_MODEL:
+ result = true;
+ break;
+ case FUNC_DISPLAY_CLEAR:
+ result = MAX7291Matrix_Clear();
+ break;
+ case FUNC_DISPLAY_DIM:
+ result = MAX7291Matrix_Dim();
+ break;
+ case FUNC_DISPLAY_SEVENSEG_TEXT:
+ case FUNC_DISPLAY_SEVENSEG_TEXTNC:
+ case FUNC_DISPLAY_NUMBER:
+ case FUNC_DISPLAY_NUMBERNC:
+ case FUNC_DISPLAY_FLOAT:
+ case FUNC_DISPLAY_FLOATNC:
+ case FUNC_DISPLAY_RAW:
+ case FUNC_DISPLAY_LEVEL:
+ case FUNC_DISPLAY_SCROLLTEXT:
+ case FUNC_DISPLAY_CLOCK:
+ case FUNC_DISPLAY_DRAW_STRING:
+ result = MAX7291Matrix_Text();
+ break;
+ case FUNC_DISPLAY_EVERY_50_MSECOND:
+ case FUNC_DISPLAY_EVERY_SECOND:
+ // ignore
+ return false;
+ default:
+ result = false;
+ }
+ }
+ return result;
+}
+
+
+
+#endif // USE_DISPLAY_MAX7219_MATRIX
+#endif // USE_DISPLAY
From b3dd33f2488184076eceadaffabaca24f8fd8dd5 Mon Sep 17 00:00:00 2001
From: Michael
Date: Fri, 19 Nov 2021 11:47:00 +0100
Subject: [PATCH 004/402] first init
---
tasmota/tasmota_template.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h
index 0de887e9c..e3f3256fc 100644
--- a/tasmota/tasmota_template.h
+++ b/tasmota/tasmota_template.h
@@ -520,6 +520,15 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_SSD1331_CS),
AGPIO(GPIO_SSD1331_DC),
#endif // USE_DISPLAY_SSD1331
+
+#ifdef USE_DISPLAY_MAX7219_MATRIX
+ #undef USE_DISPLAY_MAX7219
+ #undef USE_DISPLAY_TM1637
+ AGPIO(GPIO_MAX7219CLK),
+ AGPIO(GPIO_MAX7219DIN),
+ AGPIO(GPIO_MAX7219CS),
+#endif // USE_DISPLAY_MAX7219_MATRIX
+
#ifdef USE_DISPLAY_TM1637
AGPIO(GPIO_TM1637CLK),
AGPIO(GPIO_TM1637DIO),
From 532e5069468f6aff76cf9d8dd2140bdb60b6fab8 Mon Sep 17 00:00:00 2001
From: Michael
Date: Sat, 20 Nov 2021 17:28:38 +0100
Subject: [PATCH 005/402] use LedMatrix 1234
---
lib/lib_display/LedControl/src/LedMatrix.cpp | 186 +++++++++++++++++++
lib/lib_display/LedControl/src/LedMatrix.h | 124 +++++++++++++
tasmota/xdsp_19_max7219_matrix.ino | 152 +++++++--------
3 files changed, 373 insertions(+), 89 deletions(-)
create mode 100644 lib/lib_display/LedControl/src/LedMatrix.cpp
create mode 100644 lib/lib_display/LedControl/src/LedMatrix.h
diff --git a/lib/lib_display/LedControl/src/LedMatrix.cpp b/lib/lib_display/LedControl/src/LedMatrix.cpp
new file mode 100644
index 000000000..427ae8c52
--- /dev/null
+++ b/lib/lib_display/LedControl/src/LedMatrix.cpp
@@ -0,0 +1,186 @@
+/*
+ * LedMatrix.h - Extends the Library LedControl for multiple LED dot matrix modules, based on MAX7219/MAX7221
+ * Copyright (c) 2021 Michael Beuss
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * This permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "LedMatrix.h"
+
+// public
+LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows)
+{
+ if (colums * rows > MATRIX_MAX_MODULES)
+ {
+ // dimension exeeds maximum buffer size
+ if (colums >= MATRIX_MAX_MODULES)
+ {
+ colums = MATRIX_MAX_MODULES;
+ rows = 1;
+ }
+ else
+ {
+ rows = MATRIX_MAX_MODULES / colums;
+ }
+ }
+
+ modulesPerRow = colums;
+ modulesPerCol = rows;
+ width = colums * 8;
+ height = rows * 8;
+ modules = colums * rows;
+ moduleOrientation = ORIENTATION_UPSIDE_DOWN;
+ ledControl = new LedControl(dataPin, clkPin, csPin, modules);
+ shutdown(false); // false: on, true: off
+ clear();
+ setIntensity(7);
+}
+
+bool LedMatrix::clear(void)
+{
+ for (int i = 0; i < MATRIX_BUFFER_SIZE; i++)
+ {
+ buffer[i] = 0;
+ }
+ for (int addr = 0; addr < modules; addr++)
+ {
+ ledControl->clearDisplay(addr);
+ }
+ return true;
+}
+
+bool LedMatrix::setIntensity(byte dim)
+{
+ for (int addr = 0; addr < modules; addr++)
+ {
+ ledControl->setIntensity(addr, dim); // 1..15
+ }
+ return true;
+}
+
+bool LedMatrix::setOrientation(ModuleOrientation orientation)
+{
+ moduleOrientation = orientation;
+ return true;
+}
+
+bool LedMatrix::setPixel(int x, int y, bool on)
+{
+ if (x >= width || y >= height)
+ return false;
+
+ int modul_col = x / 8; // x pos divided by 8 is the index of the modul to the right
+ int buffer_pos = modul_col + y * width / 8;
+ byte buffer_byte = 8 >> (x % 8);
+ if (on)
+ {
+ buffer[buffer_pos] |= buffer_byte; // set bit
+ }
+ else
+ {
+ buffer[buffer_pos] &= ~buffer_byte; // reset bit
+ }
+ refreshByteOfBuffer(buffer_pos);
+ return true;
+}
+
+void LedMatrix::test()
+{
+ const static byte testMatrix[] PROGMEM = {
+ B00000010, B00111100, B00111100, B00001000,
+ B00000110, B01000010, B01000010, B00010000,
+ B00001010, B00000010, B00000010, B00100000,
+ B00000010, B00000100, B00001100, B01000100,
+ B00000010, B00011000, B00000010, B01111110,
+ B00000010, B00100000, B01000010, B00000100,
+ B00000000, B11111110, B00111100, B00000100,
+ B00000000, B00000000, B00000000, B00000000,
+ };
+ for (int i = 0; i < 32; i++)
+ {
+ buffer[i] = testMatrix[i];
+ }
+ refresh();
+}
+
+// private
+bool LedMatrix::shutdown(bool b)
+{
+ for (int addr = 0; addr < modules; addr++)
+ {
+ ledControl->shutdown(addr, b); // b: false: on, true: off
+ }
+ return true;
+}
+
+void LedMatrix::refresh()
+{
+ for (int i = 0; i < modulesPerRow * height; i++)
+ {
+ refreshByteOfBuffer(i);
+ }
+}
+
+void LedMatrix::refreshByteOfBuffer(int i)
+{
+ int line = i / modulesPerRow;
+ int addr = line / 8 + i % modulesPerRow;
+ byte b = buffer[i];
+ if (moduleOrientation == ORIENTATION_NORMAL || moduleOrientation == ORIENTATION_UPSIDE_DOWN)
+ {
+ int rowOfAddr = 0;
+ if (moduleOrientation == ORIENTATION_NORMAL)
+ {
+ rowOfAddr = line % 8; // ORIENTATION_NORMAL
+ }
+ else
+ {
+ rowOfAddr = 7 - line % 8; // ORIENTATION_UPSIDE_DOWN
+ b = revereBitorder(b);
+ }
+ ledControl->setRow(addr, rowOfAddr, b);
+ }
+ else
+ {
+ // ORIENTATION_TURN_RIGHT or ORIENTATION_TURN_LEFT
+ int colOfAddr = 0;
+ if (moduleOrientation == ORIENTATION_TURN_LEFT)
+ {
+ colOfAddr = line % 8; // ORIENTATION_TURN_LEFT
+ }
+ else
+ {
+ colOfAddr = 7 - line % 8; // ORIENTATION_TURN_RIGHT
+ b = revereBitorder(b);
+ }
+ ledControl->setColumn(addr, colOfAddr, b);
+ }
+}
+
+byte LedMatrix::revereBitorder (byte b)
+{
+ const static byte lookup[] PROGMEM = {
+ 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe,
+ 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf,
+ };
+ return (lookup[b & 0b1111] << 4) | lookup[b >> 4];
+}
diff --git a/lib/lib_display/LedControl/src/LedMatrix.h b/lib/lib_display/LedControl/src/LedMatrix.h
new file mode 100644
index 000000000..f439e5d05
--- /dev/null
+++ b/lib/lib_display/LedControl/src/LedMatrix.h
@@ -0,0 +1,124 @@
+/*
+ * LedMatrix.h - Extends the Library LedControl for multiple LED dot matrix modules, based on MAX7219/MAX7221
+ * Copyright (c) 2021 Michael Beuss
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * This permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef LedMatrix_h
+#define LedMatrix_h
+
+#include
+
+#define MATRIX_MAX_MODULES 32
+#define MATRIX_BUFFER_SIZE MATRIX_MAX_MODULES * 8 // 8 bytes per modul. One byte represents 8 LEDs.
+
+
+/**
+ * @brief LedMatric controls multiple 8x8 LED dot matrx modules.
+ * All modules in rows and clolums together build a common matrix.
+ *
+ */
+class LedMatrix
+{
+ public:
+ enum ModuleOrientation // orientation of 8x8 LED dot matrix mdules (first module is top left)
+ {
+ ORIENTATION_NORMAL, // first pixel is on top left, no turn is necessary
+ ORIENTATION_TURN_RIGHT, // first pixel is on bottom left, for correction it has to turn 90° right
+ ORIENTATION_UPSIDE_DOWN, // first pixel is on bottom right, fpr correction it has to turn 180°
+ ORIENTATION_TURN_LEFT, // first pixel is on top right, for correction is has to turn 90° left.
+ };
+
+ private:
+ unsigned int modulesPerRow;
+ unsigned int modulesPerCol;
+ unsigned int width; // matrix width [pixel]
+ unsigned int height; // matrix height [pixel]
+ unsigned int modules; // number of 8x8 mudules
+ ModuleOrientation moduleOrientation;
+ byte buffer[MATRIX_BUFFER_SIZE];
+ LedControl* ledControl;
+
+
+ public:
+ /**
+ * @brief Construct a new Led Matrix object
+ *
+ * @param colums of 8x8 LED dot matrix modules
+ * @param rows of 8x8 LED dot matrix modules
+ */
+ LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows);
+
+ /**
+ * @brief Set all LEDs off.
+ *
+ */
+ bool clear(void);
+
+ /**
+ * @brief Set the brightness of the display
+ *
+ * @param dim 0..15
+ */
+ bool setIntensity(byte dim);
+
+ /**
+ * @brief Switches the display on or off
+ *
+ * @param on true: on false: off
+ */
+ void power( bool on );
+
+ /**
+ * @brief Set the orientation of the 8x8 LED dot matrix module
+ *
+ * @param orientation
+ */
+ bool setOrientation(ModuleOrientation orientation);
+
+ /**
+ * @brief Set the Pixel object
+ *
+ * @param x horizontal position from left
+ * @param y vertical position from top
+ * @param on true: on, false: off
+ */
+ bool setPixel( int x, int y, bool on);
+ void test();
+
+ private:
+ bool shutdown(bool b);
+
+ /**
+ * @brief sends the changed content of the buffer to the display
+ *
+ */
+ void refresh();
+
+ void refreshByteOfBuffer( int i);
+
+ byte revereBitorder (byte b);
+
+};
+
+#endif //LedMatrix_h
\ No newline at end of file
diff --git a/tasmota/xdsp_19_max7219_matrix.ino b/tasmota/xdsp_19_max7219_matrix.ino
index 97c20f00b..da3177f59 100644
--- a/tasmota/xdsp_19_max7219_matrix.ino
+++ b/tasmota/xdsp_19_max7219_matrix.ino
@@ -133,70 +133,45 @@ and setting it to 3 alternates between time and date.
#define XDSP_19 19
#define CMD_MAX_LEN 55
+#include
-#include
-
-LedControl *max7219_Matrix;
+LedMatrix *max7219_Matrix;
bool max2791Matrix_init_done = false;
byte modulesPerRow = 4;
-
+byte modulesPerCol = 1;
bool MAX7291Matrix_init(void)
{
if (!PinUsed(GPIO_MAX7219DIN) || !PinUsed(GPIO_MAX7219CLK) || !PinUsed(GPIO_MAX7219CS))
{
- AddLog(LOG_LEVEL_INFO, PSTR("DSP: MAX7291Matrix_init GPIO pins missing DIN, CLK or CS"));
+ AddLog(LOG_LEVEL_INFO, PSTR("DSP: MAX7291Matrix_init GPIO pins missing DIN:%d, CLK:%d, CS:%d"), Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS) );
return false; // ensure necessariy pins are configurated
}
Settings->display_model = XDSP_19;
+ if (Settings->display_width) // [pixel]
+ {
+ modulesPerRow = (Settings->display_width - 1) / 8 + 1;
+ }
+ Settings->display_width = 8 * modulesPerRow;
Settings->display_cols[0] = Settings->display_width;
- Settings->display_height = 1;
+ if (Settings->display_height) // [pixel]
+ {
+ modulesPerCol = (Settings->display_height - 1) / 8 + 1;
+ }
+ Settings->display_height = 8 * modulesPerCol;
Settings->display_rows = Settings->display_height;
- max7219_Matrix = new LedControl(Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), modulesPerRow);
- MAX7291Matrix_On(true);
- MAX7291Matrix_Clear();
- MAX7291Matrix_Dim();
- AddLog(LOG_LEVEL_INFO, PSTR("DSP: MAX7291Matrix_init"));
+ Settings->display_cols[1] = Settings->display_height;
+ max7219_Matrix = new LedMatrix(Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), modulesPerRow, modulesPerCol);
+ int intensity = GetDisplayDimmer16(); // 0..15
+ max7219_Matrix->setIntensity(intensity);
+ int orientation = Settings->display_rotate;
+ max7219_Matrix->setOrientation((LedMatrix::ModuleOrientation)orientation );
+ AddLog(LOG_LEVEL_INFO, PSTR("DSP: MAX7291Matrix_init %dx%d modules, orientation: %d, intensity: %d"), modulesPerRow , modulesPerCol, orientation, intensity);
max2791Matrix_init_done = true;
- max7219_Matrix->setLed(0, 3, 3, true);
- AddLog(LOG_LEVEL_INFO, PSTR("DSP: setLed 3,3"));
- return true;
-}
-
-bool MAX7291Matrix_On( bool on )
-{
- for (int addr = 0; addr < modulesPerRow; addr++)
- {
- max7219_Matrix->shutdown (addr, !on); // false: on, true: off
- }
- AddLog(LOG_LEVEL_INFO, PSTR("MTX: On %d"), on);
- return true;
-
-}
-
-bool MAX7291Matrix_Dim(void)
-{
- int dim = GetDisplayDimmer16();
- for (int addr = 0; addr < modulesPerRow; addr++)
- {
- max7219_Matrix->setIntensity(addr, dim); // 1..15
- }
- AddLog(LOG_LEVEL_INFO, PSTR("DSP: Dim %d"), dim);
- return true;
-}
-
-// /*********************************************************************************************\
-// * Clears the display
-// * Command: DisplayClear
-// \*********************************************************************************************/
-bool MAX7291Matrix_Clear(void)
-{
- for(int addr=0; addrclearDisplay(addr);
- }
- AddLog(LOG_LEVEL_INFO, PSTR("DSP: Clear"));
+ max7219_Matrix->test();
+ AddLog(LOG_LEVEL_INFO, PSTR("DSP: display test"));
return true;
}
@@ -208,17 +183,18 @@ bool MAX7291Matrix_Text()
{
char sString[CMD_MAX_LEN + 1];
subStr(sString, XdrvMailbox.data, ",", 1);
- MAX7291Matrix_Clear;
+ max7219_Matrix->clear();
AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: sString %s"), sString);
// test
uint8_t length = strlen(sString);
- //if(length > modulesPerRow)
- length = modulesPerRow;
+ //if(length > modulesPerRow)
+ length = modulesPerRow;
- for(int addr = 0; addrsetLed(addr, 0, 1, true);
- AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: setLed() %d, 0, 1)"), addr);
+ for (int addr = 0; addr < length; addr++)
+ {
+ max7219_Matrix->setPixel(addr, addr, true);
+ AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: setPixel() %d, %d)"), addr, addr);
}
return true;
@@ -226,50 +202,48 @@ bool MAX7291Matrix_Text()
bool Xdsp19(uint8_t function)
{
- bool result = false;
-
+ bool result = false;
if (FUNC_DISPLAY_INIT_DRIVER == function)
{
result = MAX7291Matrix_init();
}
- else{
- //if (max2791Matrix_init_done && (XDSP_19 == Settings->display_model)) {
- switch (function) {
- case FUNC_DISPLAY_MODEL:
- result = true;
- break;
- case FUNC_DISPLAY_CLEAR:
- result = MAX7291Matrix_Clear();
- break;
- case FUNC_DISPLAY_DIM:
- result = MAX7291Matrix_Dim();
- break;
- case FUNC_DISPLAY_SEVENSEG_TEXT:
- case FUNC_DISPLAY_SEVENSEG_TEXTNC:
- case FUNC_DISPLAY_NUMBER:
- case FUNC_DISPLAY_NUMBERNC:
- case FUNC_DISPLAY_FLOAT:
- case FUNC_DISPLAY_FLOATNC:
- case FUNC_DISPLAY_RAW:
- case FUNC_DISPLAY_LEVEL:
- case FUNC_DISPLAY_SCROLLTEXT:
- case FUNC_DISPLAY_CLOCK:
- case FUNC_DISPLAY_DRAW_STRING:
- result = MAX7291Matrix_Text();
- break;
- case FUNC_DISPLAY_EVERY_50_MSECOND:
- case FUNC_DISPLAY_EVERY_SECOND:
- // ignore
- return false;
- default:
- result = false;
+ else if (max7219_Matrix && (XDSP_19 == Settings->display_model))
+ {
+ switch (function)
+ {
+ case FUNC_DISPLAY_MODEL:
+ result = true;
+ break;
+ case FUNC_DISPLAY_CLEAR:
+ result = max7219_Matrix->clear();
+ break;
+ case FUNC_DISPLAY_DIM:
+ result = max7219_Matrix->setIntensity(GetDisplayDimmer16());
+ break;
+ case FUNC_DISPLAY_SEVENSEG_TEXT:
+ case FUNC_DISPLAY_SEVENSEG_TEXTNC:
+ case FUNC_DISPLAY_NUMBER:
+ case FUNC_DISPLAY_NUMBERNC:
+ case FUNC_DISPLAY_FLOAT:
+ case FUNC_DISPLAY_FLOATNC:
+ case FUNC_DISPLAY_RAW:
+ case FUNC_DISPLAY_LEVEL:
+ case FUNC_DISPLAY_SCROLLTEXT:
+ case FUNC_DISPLAY_CLOCK:
+ case FUNC_DISPLAY_DRAW_STRING:
+ result = MAX7291Matrix_Text();
+ break;
+ case FUNC_DISPLAY_EVERY_50_MSECOND:
+ case FUNC_DISPLAY_EVERY_SECOND:
+ // ignore
+ return false;
+ default:
+ result = false;
}
}
return result;
}
-
-
#endif // USE_DISPLAY_MAX7219_MATRIX
#endif // USE_DISPLAY
From 917777d2c50deda43c19c1671c38527b882820bc Mon Sep 17 00:00:00 2001
From: Michael
Date: Tue, 23 Nov 2021 14:46:19 +0100
Subject: [PATCH 006/402] first scroll
---
lib/lib_display/LedControl/src/LedMatrix.cpp | 144 +++++++++-
lib/lib_display/LedControl/src/LedMatrix.h | 55 +++-
.../LedControl/src/font_5x8_horizontal_MSB.h | 264 ++++++++++++++++++
.../LedControl/src/font_6x8_horizontal_MSB.h | 264 ++++++++++++++++++
tasmota/xdsp_19_max7219_matrix.ino | 36 +--
5 files changed, 716 insertions(+), 47 deletions(-)
create mode 100644 lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
create mode 100644 lib/lib_display/LedControl/src/font_6x8_horizontal_MSB.h
diff --git a/lib/lib_display/LedControl/src/LedMatrix.cpp b/lib/lib_display/LedControl/src/LedMatrix.cpp
index 427ae8c52..19ac0dcb2 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.cpp
+++ b/lib/lib_display/LedControl/src/LedMatrix.cpp
@@ -25,6 +25,7 @@
*/
#include "LedMatrix.h"
+#include "font_6x8_horizontal_MSB.h"
// public
LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows)
@@ -45,22 +46,116 @@ LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, un
modulesPerRow = colums;
modulesPerCol = rows;
- width = colums * 8;
- height = rows * 8;
+ displayWidth = colums * 8;
+ displayHeight = rows * 8;
modules = colums * rows;
moduleOrientation = ORIENTATION_UPSIDE_DOWN;
ledControl = new LedControl(dataPin, clkPin, csPin, modules);
+ textBuf[0] = 0;
+ textWidth = 0;
+ textPosX = 0;
+ textPosY = 0;
+ appendTextBuf[0] = 0;
+ setScrollAppendText(" ");
shutdown(false); // false: on, true: off
clear();
setIntensity(7);
}
+bool LedMatrix::drawText( const char *str)
+{
+ strncpy(textBuf, str, TEXT_BUFFER_SIZE -1);
+ textPosX = 0;
+ textPosY = 0;
+ textWidth = strlen(textBuf) * charWidth;
+ if(textWidth < displayWidth)
+ {
+ textPosX = (displayWidth - textWidth) / 2; // center
+ }
+ else
+ {
+ // The text ist longer than the display width. Scrolling is needed.
+ // Append a space between end of text and the beginning of the repeting text.
+ appendSpace();
+ }
+ clear();
+ drawTextAt(textBuf, textPosX, textPosY);
+ refresh(); // refresh display with new string content
+ return true;
+}
+
+bool LedMatrix::drawTextAt( const char *str, const int x, const int y )
+{
+ // draw character by character
+ unsigned int len = strlen(str);
+ int xPos = x;
+ for (unsigned int i = 0; i < len; i++)
+ {
+ drawCharAt(str[i], xPos, y);
+ xPos += charWidth;
+ }
+ return true;
+}
+
+bool LedMatrix::scrollText()
+{
+ if(textWidth < displayWidth) return false; // do not scroll when text fits into the display
+
+ textPosX--;
+ if(textPosX + textWidth < 0)
+ {
+ textPosX = 0; // start from the beginning after text scrolled out of display;
+ }
+ drawTextAt(textBuf, textPosX, textPosY);
+
+ int startOfRepeatingTextPos = textPosX + textWidth;
+ if(startOfRepeatingTextPos < displayWidth)
+ {
+ // Draw repeating text.
+ drawTextAt(textBuf, startOfRepeatingTextPos, textPosY);
+ }
+ refresh();
+ return true;
+}
+
+bool LedMatrix::drawCharAt( char c, const int x, const int y)
+{
+ // ignore when the character position is not visible on the display
+ bool visible = (
+ x > 0 - (int)charWidth && x < (int)displayWidth &&
+ y > 0 - (int)charHeight && y < (int)displayHeight
+ );
+ if (!visible) return false;
+
+ // ignore the leading bits above charWidth of the font definition
+ static const byte charOffset = 8 - charWidth;
+
+ for (byte charY = 0; charY < charHeight; charY++)
+ {
+ char pixelRow = (font[c][charY]) << charOffset; // skip the first bits when the character width is smaller than 8 pixel
+ for (byte charX = 0; charX < charWidth; charX++)
+ {
+ bool pixel = (pixelRow & 0x80); // pixel=true when upper bit is set
+ setPixel(x + charX, y + charY, pixel);
+ pixelRow = pixelRow << 1; // next pixel
+ }
+ }
+ return true;
+}
+
+bool LedMatrix::clearDisplay(void)
+{
+ textBuf[0] = 0;
+ memset(textBuf, 0, TEXT_BUFFER_SIZE);
+ textWidth = 0;
+ clear();
+ return true;
+}
+
+
bool LedMatrix::clear(void)
{
- for (int i = 0; i < MATRIX_BUFFER_SIZE; i++)
- {
- buffer[i] = 0;
- }
+ memset(buffer, 0, MATRIX_BUFFER_SIZE);
for (int addr = 0; addr < modules; addr++)
{
ledControl->clearDisplay(addr);
@@ -83,14 +178,20 @@ bool LedMatrix::setOrientation(ModuleOrientation orientation)
return true;
}
-bool LedMatrix::setPixel(int x, int y, bool on)
+bool LedMatrix::setScrollAppendText(const char* append )
{
- if (x >= width || y >= height)
+ strncpy(appendTextBuf, append, TEXT_APPEND_BUFFER_SIZE -1);
+ return (strlen(append) < TEXT_APPEND_BUFFER_SIZE);
+}
+
+bool LedMatrix::setPixel(const int x, const int y, bool on)
+{
+ if (x >= displayWidth || y >= displayHeight)
return false;
int modul_col = x / 8; // x pos divided by 8 is the index of the modul to the right
- int buffer_pos = modul_col + y * width / 8;
- byte buffer_byte = 8 >> (x % 8);
+ int buffer_pos = modul_col + y * modulesPerRow;
+ byte buffer_byte = 0x80 >> (x % 8);
if (on)
{
buffer[buffer_pos] |= buffer_byte; // set bit
@@ -99,12 +200,12 @@ bool LedMatrix::setPixel(int x, int y, bool on)
{
buffer[buffer_pos] &= ~buffer_byte; // reset bit
}
- refreshByteOfBuffer(buffer_pos);
return true;
}
void LedMatrix::test()
{
+ /*
const static byte testMatrix[] PROGMEM = {
B00000010, B00111100, B00111100, B00001000,
B00000110, B01000010, B01000010, B00010000,
@@ -112,7 +213,7 @@ void LedMatrix::test()
B00000010, B00000100, B00001100, B01000100,
B00000010, B00011000, B00000010, B01111110,
B00000010, B00100000, B01000010, B00000100,
- B00000000, B11111110, B00111100, B00000100,
+ B00000000, B01111110, B00111100, B00000100,
B00000000, B00000000, B00000000, B00000000,
};
for (int i = 0; i < 32; i++)
@@ -120,6 +221,17 @@ void LedMatrix::test()
buffer[i] = testMatrix[i];
}
refresh();
+ */
+ drawText("1234567890");
+ delay(1000);
+ for( int i=0; i<320; i++)
+ {
+ delay(50);
+ scrollText();
+ }
+ //drawCharAt(0x31, 1, 0);
+ //setPixel(1,30);
+ //refresh();
}
// private
@@ -134,7 +246,7 @@ bool LedMatrix::shutdown(bool b)
void LedMatrix::refresh()
{
- for (int i = 0; i < modulesPerRow * height; i++)
+ for (int i = 0; i < modulesPerRow * displayHeight; i++)
{
refreshByteOfBuffer(i);
}
@@ -184,3 +296,9 @@ byte LedMatrix::revereBitorder (byte b)
};
return (lookup[b & 0b1111] << 4) | lookup[b >> 4];
}
+
+void LedMatrix::appendSpace()
+{
+ strncat(textBuf, appendTextBuf, TEXT_BUFFER_SIZE -1);
+ textWidth = strlen(textBuf) * charWidth;
+}
diff --git a/lib/lib_display/LedControl/src/LedMatrix.h b/lib/lib_display/LedControl/src/LedMatrix.h
index f439e5d05..586a06146 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.h
+++ b/lib/lib_display/LedControl/src/LedMatrix.h
@@ -31,6 +31,8 @@
#define MATRIX_MAX_MODULES 32
#define MATRIX_BUFFER_SIZE MATRIX_MAX_MODULES * 8 // 8 bytes per modul. One byte represents 8 LEDs.
+#define TEXT_BUFFER_SIZE 256
+#define TEXT_APPEND_BUFFER_SIZE 16
/**
@@ -52,12 +54,19 @@ class LedMatrix
private:
unsigned int modulesPerRow;
unsigned int modulesPerCol;
- unsigned int width; // matrix width [pixel]
- unsigned int height; // matrix height [pixel]
+ unsigned int displayWidth; // matrix width [pixel]
+ unsigned int displayHeight; // matrix height [pixel]
unsigned int modules; // number of 8x8 mudules
ModuleOrientation moduleOrientation;
byte buffer[MATRIX_BUFFER_SIZE];
LedControl* ledControl;
+ const unsigned int charWidth = 6;
+ const unsigned int charHeight = 8;
+ char textBuf[TEXT_BUFFER_SIZE];
+ char appendTextBuf[TEXT_APPEND_BUFFER_SIZE];
+ unsigned int textWidth; // width of text [pixel]
+ int textPosX; // horizontal pixel position of scrolling text
+ int textPosY; // vertical pixelposition of scrolling text;
public:
@@ -73,7 +82,7 @@ class LedMatrix
* @brief Set all LEDs off.
*
*/
- bool clear(void);
+ bool clearDisplay(void);
/**
* @brief Set the brightness of the display
@@ -82,6 +91,13 @@ class LedMatrix
*/
bool setIntensity(byte dim);
+ /**
+ * @brief Set the a pending string to the scrolling text to set a distance to te repeating text. Usually some spaces.
+ *
+ * @param append text to append to the scrolling text before repeating.
+ */
+ bool setScrollAppendText(const char* append );
+
/**
* @brief Switches the display on or off
*
@@ -96,6 +112,32 @@ class LedMatrix
*/
bool setOrientation(ModuleOrientation orientation);
+ /**
+ * @brief draw a string to the display.
+ * When the text fits into the size of the display, it will be shown in the center.
+ * When the text is longer than than the display width, it can be scrolled per pixel with function scrollText().
+ *
+ * @param str string to display
+ */
+ bool drawText( const char *str );
+
+ /**
+ * @brief dwaws a character string to the display. The position (x,y) is used for the upper left pixtel of the text.
+ * Existing text before the x position will not be cleared.
+ *
+ * @param str string to display
+ * @param x horizantal pixel position to start with string (default 0)
+ * @param y vertical pixel position for the top position of the string (default 0)
+ */
+ bool drawTextAt( const char *str, const int x, const int y );
+
+ /**
+ * @brief Scroll the current teext one picel to the left.
+ * Repeat with from start when end of text reached.
+ *
+ */
+ bool scrollText();
+
/**
* @brief Set the Pixel object
*
@@ -103,11 +145,14 @@ class LedMatrix
* @param y vertical position from top
* @param on true: on, false: off
*/
- bool setPixel( int x, int y, bool on);
+ bool setPixel( const int x, const int y, bool on=true);
void test();
private:
+ bool drawCharAt( char c, int x, int y );
+
bool shutdown(bool b);
+ bool clear(void);
/**
* @brief sends the changed content of the buffer to the display
@@ -119,6 +164,8 @@ class LedMatrix
byte revereBitorder (byte b);
+ void appendSpace();
+
};
#endif //LedMatrix_h
\ No newline at end of file
diff --git a/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h b/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
new file mode 100644
index 000000000..56df774a4
--- /dev/null
+++ b/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
@@ -0,0 +1,264 @@
+// 5x8 ascii font
+#ifndef font_5x8_horizontal_MSB_h
+#define font_5x8_horizontal_MSB_h
+
+const char font[256][8]={
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
+{0x0E,0x11,0x1B,0x11,0x1F,0x0E,0x00,0x00}, // 0x01
+{0x0E,0x15,0x1F,0x11,0x1F,0x0E,0x00,0x00}, // 0x02
+{0x0A,0x1F,0x1F,0x1F,0x0E,0x04,0x00,0x00}, // 0x03
+{0x04,0x04,0x0E,0x1F,0x0E,0x04,0x04,0x00}, // 0x04
+{0x04,0x0E,0x04,0x1F,0x15,0x04,0x0E,0x00}, // 0x05
+{0x04,0x0E,0x1F,0x1F,0x15,0x04,0x0E,0x00}, // 0x06
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
+{0x03,0x03,0x0E,0x11,0x11,0x11,0x0E,0x00}, // 0x0B
+{0x0E,0x11,0x11,0x11,0x0E,0x04,0x0E,0x04}, // 0x0C
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
+{0x03,0x0F,0x09,0x09,0x0B,0x1B,0x18,0x00}, // 0x0E
+{0x00,0x15,0x0E,0x1B,0x0E,0x15,0x00,0x00}, // 0x0F
+{0x00,0x10,0x1C,0x1F,0x1C,0x10,0x00,0x00}, // 0x10
+{0x00,0x01,0x07,0x1F,0x07,0x01,0x00,0x00}, // 0x11
+{0x04,0x0E,0x04,0x04,0x04,0x0E,0x04,0x00}, // 0x12
+{0x00,0x0A,0x0A,0x0A,0x00,0x0A,0x00,0x00}, // 0x13
+{0x0E,0x1A,0x1A,0x0A,0x0A,0x0A,0x0A,0x00}, // 0x14
+{0x06,0x08,0x04,0x0A,0x04,0x02,0x0C,0x00}, // 0x15
+{0x00,0x00,0x00,0x0F,0x0F,0x00,0x00,0x00}, // 0x16
+{0x04,0x0E,0x04,0x0E,0x04,0x00,0x0E,0x00}, // 0x17
+{0x04,0x0E,0x04,0x04,0x04,0x04,0x04,0x00}, // 0x18
+{0x04,0x04,0x04,0x04,0x04,0x0E,0x04,0x00}, // 0x19
+{0x00,0x00,0x02,0x0F,0x02,0x00,0x00,0x00}, // 0x1A
+{0x00,0x00,0x04,0x0F,0x04,0x00,0x00,0x00}, // 0x1B
+{0x00,0x00,0x08,0x08,0x08,0x0F,0x00,0x00}, // 0x1C
+{0x00,0x00,0x0A,0x1F,0x0A,0x00,0x00,0x00}, // 0x1D
+{0x00,0x04,0x04,0x0E,0x0E,0x1F,0x00,0x00}, // 0x1E
+{0x00,0x1F,0x0E,0x0E,0x04,0x04,0x00,0x00}, // 0x1F
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x20
+{0x04,0x04,0x04,0x04,0x00,0x04,0x00,0x00}, // 0x21
+{0x0A,0x0A,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x22
+{0x00,0x05,0x1F,0x0A,0x1F,0x14,0x00,0x00}, // 0x23
+{0x04,0x0E,0x0C,0x04,0x06,0x0E,0x04,0x00}, // 0x24
+{0x09,0x15,0x0E,0x0E,0x15,0x12,0x00,0x00}, // 0x25
+{0x04,0x0A,0x0C,0x15,0x12,0x0D,0x00,0x00}, // 0x26
+{0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x27
+{0x03,0x04,0x08,0x08,0x08,0x04,0x03,0x00}, // 0x28
+{0x18,0x04,0x02,0x02,0x02,0x04,0x18,0x00}, // 0x29
+{0x04,0x0A,0x04,0x0A,0x00,0x00,0x00,0x00}, // 0x2A
+{0x00,0x00,0x00,0x04,0x0E,0x04,0x00,0x00}, // 0x2B
+{0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x08}, // 0x2C
+{0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00}, // 0x2D
+{0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00}, // 0x2E
+{0x01,0x02,0x02,0x04,0x04,0x08,0x08,0x00}, // 0x2F
+{0x06,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0x30
+{0x04,0x0C,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0x31
+{0x0C,0x02,0x02,0x04,0x08,0x0E,0x00,0x00}, // 0x32
+{0x0C,0x02,0x0C,0x02,0x02,0x0C,0x00,0x00}, // 0x33
+{0x02,0x06,0x0A,0x0F,0x02,0x02,0x00,0x00}, // 0x34
+{0x0E,0x08,0x0C,0x02,0x02,0x0C,0x00,0x00}, // 0x35
+{0x06,0x08,0x0E,0x09,0x09,0x06,0x00,0x00}, // 0x36
+{0x0F,0x01,0x02,0x04,0x04,0x04,0x00,0x00}, // 0x37
+{0x06,0x09,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x38
+{0x06,0x09,0x09,0x07,0x01,0x06,0x00,0x00}, // 0x39
+{0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00}, // 0x3A
+{0x00,0x00,0x04,0x00,0x00,0x04,0x04,0x08}, // 0x3B
+{0x00,0x01,0x02,0x0C,0x02,0x01,0x00,0x00}, // 0x3C
+{0x00,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00}, // 0x3D
+{0x00,0x08,0x04,0x03,0x04,0x08,0x00,0x00}, // 0x3E
+{0x0E,0x01,0x02,0x04,0x00,0x04,0x00,0x00}, // 0x3F
+{0x06,0x09,0x13,0x15,0x17,0x10,0x0F,0x00}, // 0x40
+{0x00,0x04,0x0A,0x0A,0x1F,0x11,0x00,0x00}, // 0x41
+{0x00,0x0E,0x0A,0x0C,0x0A,0x0E,0x00,0x00}, // 0x42
+{0x00,0x07,0x08,0x08,0x08,0x07,0x00,0x00}, // 0x43
+{0x00,0x0E,0x09,0x09,0x09,0x0E,0x00,0x00}, // 0x44
+{0x00,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0x45
+{0x00,0x0E,0x08,0x0E,0x08,0x08,0x00,0x00}, // 0x46
+{0x00,0x07,0x08,0x0B,0x09,0x07,0x00,0x00}, // 0x47
+{0x00,0x09,0x09,0x0F,0x09,0x09,0x00,0x00}, // 0x48
+{0x00,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0x49
+{0x00,0x0E,0x02,0x02,0x02,0x0C,0x00,0x00}, // 0x4A
+{0x00,0x09,0x0A,0x0C,0x0A,0x09,0x00,0x00}, // 0x4B
+{0x00,0x08,0x08,0x08,0x08,0x0F,0x00,0x00}, // 0x4C
+{0x00,0x11,0x1B,0x15,0x15,0x11,0x00,0x00}, // 0x4D
+{0x00,0x09,0x0D,0x0B,0x09,0x09,0x00,0x00}, // 0x4E
+{0x00,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0x4F
+{0x00,0x0E,0x09,0x0E,0x08,0x08,0x00,0x00}, // 0x50
+{0x00,0x0E,0x11,0x11,0x11,0x0E,0x02,0x01}, // 0x51
+{0x00,0x0C,0x0A,0x0C,0x0A,0x09,0x00,0x00}, // 0x52
+{0x00,0x06,0x08,0x04,0x02,0x0C,0x00,0x00}, // 0x53
+{0x00,0x1F,0x04,0x04,0x04,0x04,0x00,0x00}, // 0x54
+{0x00,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0x55
+{0x00,0x09,0x09,0x09,0x06,0x06,0x00,0x00}, // 0x56
+{0x00,0x11,0x15,0x15,0x0A,0x0A,0x00,0x00}, // 0x57
+{0x00,0x11,0x0A,0x04,0x0A,0x11,0x00,0x00}, // 0x58
+{0x00,0x11,0x0A,0x04,0x04,0x04,0x00,0x00}, // 0x59
+{0x00,0x0F,0x01,0x06,0x08,0x0F,0x00,0x00}, // 0x5A
+{0x06,0x04,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x5B
+{0x10,0x08,0x08,0x04,0x04,0x02,0x02,0x00}, // 0x5C
+{0x0C,0x04,0x04,0x04,0x04,0x04,0x0C,0x00}, // 0x5D
+{0x04,0x0A,0x0A,0x11,0x11,0x00,0x00,0x00}, // 0x5E
+{0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00}, // 0x5F
+{0x08,0x04,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x60
+{0x00,0x00,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x61
+{0x08,0x08,0x0E,0x09,0x09,0x0E,0x00,0x00}, // 0x62
+{0x00,0x00,0x06,0x08,0x08,0x06,0x00,0x00}, // 0x63
+{0x02,0x02,0x0E,0x12,0x12,0x0E,0x00,0x00}, // 0x64
+{0x00,0x00,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x65
+{0x03,0x04,0x0F,0x04,0x04,0x04,0x00,0x00}, // 0x66
+{0x00,0x00,0x07,0x09,0x0F,0x01,0x0E,0x00}, // 0x67
+{0x08,0x08,0x0A,0x0D,0x09,0x09,0x00,0x00}, // 0x68
+{0x04,0x00,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0x69
+{0x02,0x00,0x0E,0x02,0x02,0x02,0x0C,0x00}, // 0x6A
+{0x08,0x08,0x0A,0x0C,0x0A,0x09,0x00,0x00}, // 0x6B
+{0x0C,0x04,0x04,0x04,0x04,0x04,0x00,0x00}, // 0x6C
+{0x00,0x00,0x15,0x1F,0x15,0x15,0x00,0x00}, // 0x6D
+{0x00,0x00,0x0A,0x0D,0x09,0x09,0x00,0x00}, // 0x6E
+{0x00,0x00,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x6F
+{0x00,0x00,0x0E,0x09,0x09,0x0E,0x08,0x00}, // 0x70
+{0x00,0x00,0x0E,0x12,0x12,0x0E,0x02,0x00}, // 0x71
+{0x00,0x00,0x0A,0x0C,0x08,0x08,0x00,0x00}, // 0x72
+{0x00,0x00,0x06,0x0C,0x02,0x0C,0x00,0x00}, // 0x73
+{0x00,0x04,0x0F,0x04,0x04,0x02,0x00,0x00}, // 0x74
+{0x00,0x00,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0x75
+{0x00,0x00,0x09,0x09,0x06,0x06,0x00,0x00}, // 0x76
+{0x00,0x00,0x15,0x15,0x0E,0x0A,0x00,0x00}, // 0x77
+{0x00,0x00,0x09,0x06,0x06,0x09,0x00,0x00}, // 0x78
+{0x00,0x00,0x09,0x09,0x06,0x06,0x1C,0x00}, // 0x79
+{0x00,0x00,0x0E,0x06,0x08,0x0E,0x00,0x00}, // 0x7A
+{0x02,0x04,0x04,0x08,0x04,0x04,0x02,0x00}, // 0x7B
+{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00}, // 0x7C
+{0x08,0x04,0x04,0x02,0x04,0x04,0x08,0x00}, // 0x7D
+{0x00,0x00,0x00,0x0D,0x12,0x00,0x00,0x00}, // 0x7E
+{0x00,0x04,0x0A,0x0A,0x0A,0x0E,0x00,0x00}, // 0x7F
+{0x00,0x07,0x08,0x08,0x08,0x07,0x02,0x04}, // 0x80
+{0x09,0x00,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0x81
+{0x01,0x02,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x82
+{0x06,0x09,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x83
+{0x0A,0x00,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x84
+{0x10,0x08,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x85
+{0x04,0x0A,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x86
+{0x00,0x00,0x06,0x08,0x08,0x06,0x02,0x04}, // 0x87
+{0x06,0x09,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x88
+{0x0A,0x00,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x89
+{0x10,0x08,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x8A
+{0x0A,0x00,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0x8B
+{0x06,0x09,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0x8C
+{0x10,0x08,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0x8D
+{0x0A,0x04,0x0A,0x0A,0x1F,0x11,0x00,0x00}, // 0x8E
+{0x04,0x0A,0x04,0x0A,0x1F,0x11,0x00,0x00}, // 0x8F
+{0x01,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0x90
+{0x00,0x00,0x1A,0x07,0x1C,0x13,0x00,0x00}, // 0x91
+{0x00,0x07,0x0A,0x0B,0x1E,0x13,0x00,0x00}, // 0x92
+{0x0C,0x12,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x93
+{0x09,0x00,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x94
+{0x10,0x08,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x95
+{0x0C,0x12,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0x96
+{0x08,0x04,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0x97
+{0x09,0x00,0x09,0x09,0x06,0x06,0x1C,0x00}, // 0x98
+{0x11,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0x99
+{0x12,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0x9A
+{0x00,0x01,0x06,0x0B,0x0D,0x06,0x08,0x00}, // 0x9B
+{0x00,0x04,0x08,0x0C,0x18,0x0E,0x00,0x00}, // 0x9C
+{0x01,0x0E,0x13,0x15,0x19,0x0E,0x10,0x00}, // 0x9D
+{0x00,0x00,0x09,0x06,0x06,0x09,0x00,0x00}, // 0x9E
+{0x02,0x04,0x04,0x0E,0x04,0x04,0x08,0x00}, // 0x9F
+{0x01,0x02,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0xA0
+{0x01,0x02,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0xA1
+{0x01,0x02,0x06,0x09,0x09,0x06,0x00,0x00}, // 0xA2
+{0x01,0x02,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0xA3
+{0x0F,0x00,0x0A,0x0D,0x09,0x09,0x00,0x00}, // 0xA4
+{0x1F,0x09,0x0D,0x0B,0x09,0x09,0x00,0x00}, // 0xA5
+{0x0C,0x02,0x0E,0x0A,0x0E,0x00,0x00,0x00}, // 0xA6
+{0x04,0x0A,0x0A,0x0A,0x04,0x00,0x00,0x00}, // 0xA7
+{0x00,0x04,0x00,0x04,0x04,0x02,0x0C,0x00}, // 0xA8
+{0x0E,0x17,0x17,0x15,0x17,0x0E,0x00,0x00}, // 0xA9
+{0x00,0x00,0x00,0x0E,0x02,0x02,0x00,0x00}, // 0xAA
+{0x19,0x0A,0x0F,0x05,0x0A,0x13,0x00,0x00}, // 0xAB
+{0x19,0x0A,0x0A,0x05,0x0B,0x11,0x00,0x00}, // 0xAC
+{0x00,0x00,0x04,0x00,0x04,0x04,0x04,0x00}, // 0xAD
+{0x00,0x05,0x0A,0x14,0x0A,0x05,0x00,0x00}, // 0xAE
+{0x00,0x14,0x0A,0x05,0x0A,0x14,0x00,0x00}, // 0xAF
+{0x15,0x00,0x15,0x00,0x15,0x00,0x15,0x00}, // 0xB0
+{0x15,0x0A,0x15,0x0A,0x15,0x0A,0x15,0x0A}, // 0xB1
+{0x1F,0x15,0x1F,0x15,0x1F,0x15,0x1F,0x15}, // 0xB2
+{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04}, // 0xB3
+{0x04,0x04,0x04,0x1C,0x04,0x04,0x04,0x04}, // 0xB4
+{0x02,0x04,0x0A,0x0A,0x1F,0x11,0x00,0x00}, // 0xB5
+{0x06,0x09,0x04,0x0A,0x1F,0x11,0x00,0x00}, // 0xB6
+{0x08,0x04,0x0A,0x0A,0x1F,0x11,0x00,0x00}, // 0xB7
+{0x0E,0x11,0x17,0x15,0x17,0x11,0x0E,0x00}, // 0xB8
+{0x0A,0x0A,0x1A,0x02,0x1A,0x0A,0x0A,0x0A}, // 0xB9
+{0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A}, // 0xBA
+{0x00,0x00,0x1E,0x02,0x1A,0x0A,0x0A,0x0A}, // 0xBB
+{0x0A,0x0A,0x1A,0x02,0x1E,0x00,0x00,0x00}, // 0xBC
+{0x00,0x04,0x0E,0x08,0x0E,0x04,0x00,0x00}, // 0xBD
+{0x00,0x11,0x0A,0x04,0x0E,0x04,0x00,0x00}, // 0xBE
+{0x00,0x00,0x00,0x1C,0x04,0x04,0x04,0x04}, // 0xBF
+{0x04,0x04,0x04,0x07,0x00,0x00,0x00,0x00}, // 0xC0
+{0x04,0x04,0x04,0x1F,0x00,0x00,0x00,0x00}, // 0xC1
+{0x00,0x00,0x00,0x1F,0x04,0x04,0x04,0x04}, // 0xC2
+{0x04,0x04,0x04,0x07,0x04,0x04,0x04,0x04}, // 0xC3
+{0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00}, // 0xC4
+{0x04,0x04,0x04,0x1F,0x04,0x04,0x04,0x04}, // 0xC5
+{0x0D,0x12,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0xC6
+{0x0D,0x12,0x04,0x0A,0x1F,0x11,0x00,0x00}, // 0xC7
+{0x0A,0x0A,0x0B,0x08,0x0F,0x00,0x00,0x00}, // 0xC8
+{0x00,0x00,0x0F,0x08,0x0B,0x0A,0x0A,0x0A}, // 0xC9
+{0x0A,0x0A,0x1B,0x00,0x1F,0x00,0x00,0x00}, // 0xCA
+{0x00,0x00,0x1F,0x00,0x1B,0x0A,0x0A,0x0A}, // 0xCB
+{0x0A,0x0A,0x0B,0x08,0x0B,0x0A,0x0A,0x0A}, // 0xCC
+{0x00,0x00,0x1F,0x00,0x1F,0x00,0x00,0x00}, // 0xCD
+{0x0A,0x0A,0x1B,0x00,0x1B,0x0A,0x0A,0x0A}, // 0xCE
+{0x00,0x11,0x0E,0x0A,0x0E,0x11,0x00,0x00}, // 0xCF
+{0x1E,0x04,0x0E,0x12,0x12,0x0C,0x00,0x00}, // 0xD0
+{0x00,0x0E,0x09,0x1D,0x09,0x0E,0x00,0x00}, // 0xD1
+{0x0E,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0xD2
+{0x11,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0xD3
+{0x10,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0xD4
+{0x00,0x00,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0xD5
+{0x01,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0xD6
+{0x0E,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0xD7
+{0x11,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0xD8
+{0x04,0x04,0x04,0x1C,0x00,0x00,0x00,0x00}, // 0xD9
+{0x00,0x00,0x00,0x07,0x04,0x04,0x04,0x04}, // 0xDA
+{0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F}, // 0xDB
+{0x00,0x00,0x00,0x00,0x1F,0x1F,0x1F,0x1F}, // 0xDC
+{0x04,0x04,0x04,0x00,0x00,0x04,0x04,0x04}, // 0xDD
+{0x10,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0xDE
+{0x1F,0x1F,0x1F,0x1F,0x00,0x00,0x00,0x00}, // 0xDF
+{0x01,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0xE0
+{0x04,0x0A,0x0A,0x0A,0x09,0x0A,0x00,0x00}, // 0xE1
+{0x0E,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0xE2
+{0x10,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0xE3
+{0x0D,0x12,0x06,0x09,0x09,0x06,0x00,0x00}, // 0xE4
+{0x1E,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0xE5
+{0x00,0x00,0x09,0x09,0x0B,0x0D,0x08,0x00}, // 0xE6
+{0x08,0x08,0x0E,0x09,0x09,0x0E,0x08,0x00}, // 0xE7
+{0x00,0x08,0x0E,0x09,0x0E,0x08,0x00,0x00}, // 0xE8
+{0x01,0x12,0x12,0x12,0x12,0x0C,0x00,0x00}, // 0xE9
+{0x0F,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0xEA
+{0x10,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0xEB
+{0x01,0x02,0x09,0x09,0x06,0x06,0x18,0x00}, // 0xEC
+{0x02,0x15,0x0A,0x04,0x04,0x04,0x00,0x00}, // 0xED
+{0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEE
+{0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEF
+{0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00}, // 0xF0
+{0x00,0x00,0x04,0x0E,0x04,0x0E,0x00,0x00}, // 0xF1
+{0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x1F}, // 0xF2
+{0x19,0x1A,0x0A,0x1D,0x0B,0x11,0x00,0x00}, // 0xF3
+{0x0E,0x1A,0x1A,0x0A,0x0A,0x0A,0x0A,0x00}, // 0xF4
+{0x06,0x08,0x04,0x0A,0x04,0x02,0x0C,0x00}, // 0xF5
+{0x00,0x04,0x00,0x0E,0x00,0x04,0x00,0x00}, // 0xF6
+{0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x08}, // 0xF7
+{0x06,0x09,0x09,0x06,0x00,0x00,0x00,0x00}, // 0xF8
+{0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF9
+{0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00}, // 0xFA
+{0x0C,0x04,0x04,0x04,0x0E,0x00,0x00,0x00}, // 0xFB
+{0x0C,0x02,0x0C,0x02,0x0C,0x00,0x00,0x00}, // 0xFC
+{0x0C,0x02,0x04,0x08,0x0E,0x00,0x00,0x00}, // 0xFD
+{0x00,0x00,0x0F,0x0F,0x0F,0x0F,0x00,0x00}, // 0xFE
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} // 0xFF
+};
+
+#endif // font_5x8_horizontal_MSB_h
\ No newline at end of file
diff --git a/lib/lib_display/LedControl/src/font_6x8_horizontal_MSB.h b/lib/lib_display/LedControl/src/font_6x8_horizontal_MSB.h
new file mode 100644
index 000000000..cc3a323cc
--- /dev/null
+++ b/lib/lib_display/LedControl/src/font_6x8_horizontal_MSB.h
@@ -0,0 +1,264 @@
+// 6x8 ascii font
+#ifndef font_6x8_horizontal_MSB_h
+#define font_6x8_horizontal_MSB_h
+
+const char font[256][8]={
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
+{0x0E,0x11,0x1B,0x11,0x15,0x11,0x0E,0x00}, // 0x01
+{0x0E,0x1F,0x15,0x1F,0x11,0x1F,0x0E,0x00}, // 0x02
+{0x00,0x0A,0x1F,0x1F,0x1F,0x0E,0x04,0x00}, // 0x03
+{0x00,0x04,0x0E,0x1F,0x1F,0x0E,0x04,0x00}, // 0x04
+{0x04,0x0E,0x0E,0x04,0x1F,0x1F,0x04,0x00}, // 0x05
+{0x00,0x04,0x0E,0x1F,0x1F,0x04,0x0E,0x00}, // 0x06
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
+{0x00,0x07,0x03,0x0D,0x12,0x12,0x0C,0x00}, // 0x0B
+{0x0E,0x11,0x11,0x0E,0x04,0x0E,0x04,0x00}, // 0x0C
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
+{0x03,0x0D,0x0B,0x0D,0x0B,0x1B,0x18,0x00}, // 0x0E
+{0x00,0x15,0x0E,0x1B,0x0E,0x15,0x00,0x00}, // 0x0F
+{0x08,0x0C,0x0E,0x0F,0x0E,0x0C,0x08,0x00}, // 0x10
+{0x02,0x06,0x0E,0x1E,0x0E,0x06,0x02,0x00}, // 0x11
+{0x04,0x0E,0x1F,0x04,0x1F,0x0E,0x04,0x00}, // 0x12
+{0x0A,0x0A,0x0A,0x0A,0x0A,0x00,0x0A,0x00}, // 0x13
+{0x0F,0x15,0x15,0x0D,0x05,0x05,0x05,0x00}, // 0x14
+{0x0E,0x11,0x0C,0x0A,0x06,0x11,0x0E,0x00}, // 0x15
+{0x00,0x00,0x00,0x00,0x00,0x1E,0x1E,0x00}, // 0x16
+{0x04,0x0E,0x1F,0x04,0x1F,0x0E,0x04,0x0E}, // 0x17
+{0x04,0x0E,0x1F,0x04,0x04,0x04,0x04,0x00}, // 0x18
+{0x04,0x04,0x04,0x04,0x1F,0x0E,0x04,0x00}, // 0x19
+{0x00,0x04,0x06,0x1F,0x06,0x04,0x00,0x00}, // 0x1A
+{0x00,0x04,0x0C,0x1F,0x0C,0x04,0x00,0x00}, // 0x1B
+{0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x00}, // 0x1C
+{0x00,0x0A,0x0A,0x1F,0x0A,0x0A,0x00,0x00}, // 0x1D
+{0x04,0x04,0x0E,0x0E,0x1F,0x1F,0x00,0x00}, // 0x1E
+{0x1F,0x1F,0x0E,0x0E,0x04,0x04,0x00,0x00}, // 0x1F
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x20
+{0x04,0x0E,0x0E,0x04,0x04,0x00,0x04,0x00}, // 0x21
+{0x1B,0x1B,0x12,0x00,0x00,0x00,0x00,0x00}, // 0x22
+{0x00,0x0A,0x1F,0x0A,0x0A,0x1F,0x0A,0x00}, // 0x23
+{0x08,0x0E,0x10,0x0C,0x02,0x1C,0x04,0x00}, // 0x24
+{0x19,0x19,0x02,0x04,0x08,0x13,0x13,0x00}, // 0x25
+{0x08,0x14,0x14,0x08,0x15,0x12,0x0D,0x00}, // 0x26
+{0x0C,0x0C,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x27
+{0x04,0x08,0x08,0x08,0x08,0x08,0x04,0x00}, // 0x28
+{0x08,0x04,0x04,0x04,0x04,0x04,0x08,0x00}, // 0x29
+{0x00,0x0A,0x0E,0x1F,0x0E,0x0A,0x00,0x00}, // 0x2A
+{0x00,0x04,0x04,0x1F,0x04,0x04,0x00,0x00}, // 0x2B
+{0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x08}, // 0x2C
+{0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00}, // 0x2D
+{0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00}, // 0x2E
+{0x00,0x01,0x02,0x04,0x08,0x10,0x00,0x00}, // 0x2F
+{0x0E,0x11,0x13,0x15,0x19,0x11,0x0E,0x00}, // 0x30
+{0x04,0x0C,0x04,0x04,0x04,0x04,0x0E,0x00}, // 0x31
+{0x0E,0x11,0x01,0x06,0x08,0x10,0x1F,0x00}, // 0x32
+{0x0E,0x11,0x01,0x0E,0x01,0x11,0x0E,0x00}, // 0x33
+{0x02,0x06,0x0A,0x12,0x1F,0x02,0x02,0x00}, // 0x34
+{0x1F,0x10,0x10,0x1E,0x01,0x11,0x0E,0x00}, // 0x35
+{0x06,0x08,0x10,0x1E,0x11,0x11,0x0E,0x00}, // 0x36
+{0x1F,0x01,0x02,0x04,0x08,0x08,0x08,0x00}, // 0x37
+{0x0E,0x11,0x11,0x0E,0x11,0x11,0x0E,0x00}, // 0x38
+{0x0E,0x11,0x11,0x0F,0x01,0x02,0x0C,0x00}, // 0x39
+{0x00,0x00,0x0C,0x0C,0x00,0x0C,0x0C,0x00}, // 0x3A
+{0x00,0x00,0x0C,0x0C,0x00,0x0C,0x0C,0x08}, // 0x3B
+{0x02,0x04,0x08,0x10,0x08,0x04,0x02,0x00}, // 0x3C
+{0x00,0x00,0x1F,0x00,0x00,0x1F,0x00,0x00}, // 0x3D
+{0x08,0x04,0x02,0x01,0x02,0x04,0x08,0x00}, // 0x3E
+{0x0E,0x11,0x01,0x06,0x04,0x00,0x04,0x00}, // 0x3F
+{0x0E,0x11,0x17,0x15,0x17,0x10,0x0E,0x00}, // 0x40
+{0x0E,0x11,0x11,0x11,0x1F,0x11,0x11,0x00}, // 0x41
+{0x1E,0x11,0x11,0x1E,0x11,0x11,0x1E,0x00}, // 0x42
+{0x0E,0x11,0x10,0x10,0x10,0x11,0x0E,0x00}, // 0x43
+{0x1E,0x11,0x11,0x11,0x11,0x11,0x1E,0x00}, // 0x44
+{0x1F,0x10,0x10,0x1E,0x10,0x10,0x1F,0x00}, // 0x45
+{0x1F,0x10,0x10,0x1E,0x10,0x10,0x10,0x00}, // 0x46
+{0x0E,0x11,0x10,0x17,0x11,0x11,0x0F,0x00}, // 0x47
+{0x11,0x11,0x11,0x1F,0x11,0x11,0x11,0x00}, // 0x48
+{0x0E,0x04,0x04,0x04,0x04,0x04,0x0E,0x00}, // 0x49
+{0x01,0x01,0x01,0x01,0x11,0x11,0x0E,0x00}, // 0x4A
+{0x11,0x12,0x14,0x18,0x14,0x12,0x11,0x00}, // 0x4B
+{0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0x00}, // 0x4C
+{0x11,0x1B,0x15,0x11,0x11,0x11,0x11,0x00}, // 0x4D
+{0x11,0x19,0x15,0x13,0x11,0x11,0x11,0x00}, // 0x4E
+{0x0E,0x11,0x11,0x11,0x11,0x11,0x0E,0x00}, // 0x4F
+{0x1E,0x11,0x11,0x1E,0x10,0x10,0x10,0x00}, // 0x50
+{0x0E,0x11,0x11,0x11,0x15,0x12,0x0D,0x00}, // 0x51
+{0x1E,0x11,0x11,0x1E,0x12,0x11,0x11,0x00}, // 0x52
+{0x0E,0x11,0x10,0x0E,0x01,0x11,0x0E,0x00}, // 0x53
+{0x1F,0x04,0x04,0x04,0x04,0x04,0x04,0x00}, // 0x54
+{0x11,0x11,0x11,0x11,0x11,0x11,0x0E,0x00}, // 0x55
+{0x11,0x11,0x11,0x11,0x11,0x0A,0x04,0x00}, // 0x56
+{0x11,0x11,0x15,0x15,0x15,0x15,0x0A,0x00}, // 0x57
+{0x11,0x11,0x0A,0x04,0x0A,0x11,0x11,0x00}, // 0x58
+{0x11,0x11,0x11,0x0A,0x04,0x04,0x04,0x00}, // 0x59
+{0x1E,0x02,0x04,0x08,0x10,0x10,0x1E,0x00}, // 0x5A
+{0x0E,0x08,0x08,0x08,0x08,0x08,0x0E,0x00}, // 0x5B
+{0x00,0x10,0x08,0x04,0x02,0x01,0x00,0x00}, // 0x5C
+{0x0E,0x02,0x02,0x02,0x02,0x02,0x0E,0x00}, // 0x5D
+{0x04,0x0A,0x11,0x00,0x00,0x00,0x00,0x00}, // 0x5E
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F}, // 0x5F
+{0x0C,0x0C,0x04,0x00,0x00,0x00,0x00,0x00}, // 0x60
+{0x00,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x61
+{0x10,0x10,0x1E,0x11,0x11,0x11,0x1E,0x00}, // 0x62
+{0x00,0x00,0x0E,0x11,0x10,0x11,0x0E,0x00}, // 0x63
+{0x01,0x01,0x0F,0x11,0x11,0x11,0x0F,0x00}, // 0x64
+{0x00,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x65
+{0x06,0x08,0x08,0x1E,0x08,0x08,0x08,0x00}, // 0x66
+{0x00,0x00,0x0F,0x11,0x11,0x0F,0x01,0x0E}, // 0x67
+{0x10,0x10,0x1C,0x12,0x12,0x12,0x12,0x00}, // 0x68
+{0x04,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x69
+{0x02,0x00,0x06,0x02,0x02,0x02,0x12,0x0C}, // 0x6A
+{0x10,0x10,0x12,0x14,0x18,0x14,0x12,0x00}, // 0x6B
+{0x04,0x04,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x6C
+{0x00,0x00,0x1A,0x15,0x15,0x11,0x11,0x00}, // 0x6D
+{0x00,0x00,0x1C,0x12,0x12,0x12,0x12,0x00}, // 0x6E
+{0x00,0x00,0x0E,0x11,0x11,0x11,0x0E,0x00}, // 0x6F
+{0x00,0x00,0x1E,0x11,0x11,0x11,0x1E,0x10}, // 0x70
+{0x00,0x00,0x0F,0x11,0x11,0x11,0x0F,0x01}, // 0x71
+{0x00,0x00,0x16,0x09,0x08,0x08,0x1C,0x00}, // 0x72
+{0x00,0x00,0x0E,0x10,0x0E,0x01,0x0E,0x00}, // 0x73
+{0x00,0x08,0x1E,0x08,0x08,0x0A,0x04,0x00}, // 0x74
+{0x00,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x75
+{0x00,0x00,0x11,0x11,0x11,0x0A,0x04,0x00}, // 0x76
+{0x00,0x00,0x11,0x11,0x15,0x1F,0x0A,0x00}, // 0x77
+{0x00,0x00,0x12,0x12,0x0C,0x12,0x12,0x00}, // 0x78
+{0x00,0x00,0x12,0x12,0x12,0x0E,0x04,0x18}, // 0x79
+{0x00,0x00,0x1E,0x02,0x0C,0x10,0x1E,0x00}, // 0x7A
+{0x06,0x08,0x08,0x18,0x08,0x08,0x06,0x00}, // 0x7B
+{0x04,0x04,0x04,0x00,0x04,0x04,0x04,0x00}, // 0x7C
+{0x0C,0x02,0x02,0x03,0x02,0x02,0x0C,0x00}, // 0x7D
+{0x0A,0x14,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x7E
+{0x04,0x0E,0x1B,0x11,0x11,0x1F,0x00,0x00}, // 0x7F
+{0x0E,0x11,0x10,0x10,0x11,0x0E,0x04,0x0C}, // 0x80
+{0x12,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x81
+{0x03,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x82
+{0x0E,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x83
+{0x0A,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x84
+{0x0C,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x85
+{0x0E,0x0A,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x86
+{0x00,0x0E,0x11,0x10,0x11,0x0E,0x04,0x0C}, // 0x87
+{0x0E,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x88
+{0x0A,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x89
+{0x0C,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x8A
+{0x0A,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8B
+{0x0E,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8C
+{0x08,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8D
+{0x0A,0x00,0x04,0x0A,0x11,0x1F,0x11,0x00}, // 0x8E
+{0x0E,0x0A,0x0E,0x1B,0x11,0x1F,0x11,0x00}, // 0x8F
+{0x03,0x00,0x1F,0x10,0x1E,0x10,0x1F,0x00}, // 0x90
+{0x00,0x00,0x1E,0x05,0x1F,0x14,0x0F,0x00}, // 0x91
+{0x0F,0x14,0x14,0x1F,0x14,0x14,0x17,0x00}, // 0x92
+{0x0E,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x93
+{0x0A,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x94
+{0x18,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x95
+{0x0E,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x96
+{0x18,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x97
+{0x0A,0x00,0x12,0x12,0x12,0x0E,0x04,0x18}, // 0x98
+{0x12,0x0C,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0x99
+{0x0A,0x00,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0x9A
+{0x00,0x00,0x01,0x0E,0x16,0x1A,0x1C,0x20}, // 0x9B
+{0x06,0x09,0x08,0x1E,0x08,0x09,0x17,0x00}, // 0x9C
+{0x0F,0x13,0x15,0x15,0x15,0x19,0x1E,0x00}, // 0x9D
+{0x00,0x11,0x0A,0x04,0x0A,0x11,0x00,0x00}, // 0x9E
+{0x02,0x05,0x04,0x0E,0x04,0x04,0x14,0x08}, // 0x9F
+{0x06,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0xA0
+{0x06,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0xA1
+{0x06,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0xA2
+{0x06,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0xA3
+{0x0A,0x14,0x00,0x1C,0x12,0x12,0x12,0x00}, // 0xA4
+{0x0A,0x14,0x00,0x12,0x1A,0x16,0x12,0x00}, // 0xA5
+{0x0E,0x01,0x0F,0x11,0x0F,0x00,0x0F,0x00}, // 0xA6
+{0x0C,0x12,0x12,0x12,0x0C,0x00,0x1E,0x00}, // 0xA7
+{0x04,0x00,0x04,0x0C,0x10,0x11,0x0E,0x00}, // 0xA8
+{0x1E,0x25,0x2B,0x2D,0x2B,0x21,0x1E,0x00}, // 0xA9
+{0x00,0x00,0x3F,0x01,0x01,0x00,0x00,0x00}, // 0xAA
+{0x10,0x12,0x14,0x0E,0x11,0x02,0x07,0x00}, // 0xAB
+{0x10,0x12,0x14,0x0B,0x15,0x07,0x01,0x00}, // 0xAC
+{0x04,0x00,0x04,0x04,0x0E,0x0E,0x04,0x00}, // 0xAD
+{0x00,0x00,0x09,0x12,0x09,0x00,0x00,0x00}, // 0xAE
+{0x00,0x00,0x12,0x09,0x12,0x00,0x00,0x00}, // 0xAF
+{0x15,0x00,0x2A,0x00,0x15,0x00,0x2A,0x00}, // 0xB0
+{0x15,0x2A,0x15,0x2A,0x15,0x2A,0x15,0x2A}, // 0xB1
+{0x2A,0x3F,0x15,0x3F,0x2A,0x3F,0x15,0x3F}, // 0xB2
+{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04}, // 0xB3
+{0x04,0x04,0x04,0x3C,0x04,0x04,0x04,0x04}, // 0xB4
+{0x06,0x00,0x04,0x0A,0x11,0x1F,0x11,0x00}, // 0xB5
+{0x0E,0x00,0x04,0x0A,0x11,0x1F,0x11,0x00}, // 0xB6
+{0x0C,0x00,0x04,0x0A,0x11,0x1F,0x11,0x00}, // 0xB7
+{0x1E,0x21,0x2D,0x29,0x2D,0x21,0x1E,0x00}, // 0xB8
+{0x14,0x34,0x04,0x34,0x14,0x14,0x14,0x14}, // 0xB9
+{0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14}, // 0xBA
+{0x00,0x3C,0x04,0x34,0x14,0x14,0x14,0x14}, // 0xBB
+{0x14,0x34,0x04,0x3C,0x00,0x00,0x00,0x00}, // 0xBC
+{0x00,0x04,0x0E,0x10,0x10,0x0E,0x04,0x00}, // 0xBD
+{0x11,0x0A,0x04,0x1F,0x04,0x1F,0x04,0x00}, // 0xBE
+{0x00,0x00,0x00,0x3C,0x04,0x04,0x04,0x04}, // 0xBF
+{0x04,0x04,0x04,0x07,0x00,0x00,0x00,0x00}, // 0xC0
+{0x04,0x04,0x04,0x3F,0x00,0x00,0x00,0x00}, // 0xC1
+{0x00,0x00,0x00,0x3F,0x04,0x04,0x04,0x04}, // 0xC2
+{0x04,0x04,0x04,0x07,0x04,0x04,0x04,0x04}, // 0xC3
+{0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00}, // 0xC4
+{0x04,0x04,0x04,0x3F,0x04,0x04,0x04,0x04}, // 0xC5
+{0x05,0x0A,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0xC6
+{0x05,0x0A,0x04,0x0A,0x11,0x1F,0x11,0x00}, // 0xC7
+{0x14,0x17,0x10,0x1F,0x00,0x00,0x00,0x00}, // 0xC8
+{0x00,0x1F,0x10,0x17,0x14,0x14,0x14,0x14}, // 0xC9
+{0x14,0x37,0x00,0x3F,0x00,0x00,0x00,0x00}, // 0xCA
+{0x00,0x3F,0x00,0x37,0x14,0x14,0x14,0x14}, // 0xCB
+{0x14,0x17,0x10,0x17,0x14,0x14,0x14,0x14}, // 0xCC
+{0x00,0x3F,0x00,0x3F,0x00,0x00,0x00,0x00}, // 0xCD
+{0x14,0x37,0x00,0x37,0x14,0x14,0x14,0x14}, // 0xCE
+{0x11,0x0E,0x11,0x11,0x11,0x0E,0x11,0x00}, // 0xCF
+{0x0C,0x10,0x08,0x04,0x0E,0x12,0x0C,0x00}, // 0xD0
+{0x0E,0x09,0x09,0x1D,0x09,0x09,0x0E,0x00}, // 0xD1
+{0x0E,0x00,0x1F,0x10,0x1E,0x10,0x1F,0x00}, // 0xD2
+{0x0A,0x00,0x1F,0x10,0x1E,0x10,0x1F,0x00}, // 0xD3
+{0x0C,0x00,0x1F,0x10,0x1E,0x10,0x1F,0x00}, // 0xD4
+{0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00}, // 0xD5
+{0x06,0x00,0x0E,0x04,0x04,0x04,0x0E,0x00}, // 0xD6
+{0x0E,0x00,0x0E,0x04,0x04,0x04,0x0E,0x00}, // 0xD7
+{0x0A,0x00,0x0E,0x04,0x04,0x04,0x0E,0x00}, // 0xD8
+{0x04,0x04,0x04,0x3C,0x00,0x00,0x00,0x00}, // 0xD9
+{0x00,0x00,0x00,0x07,0x04,0x04,0x04,0x04}, // 0xDA
+{0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F}, // 0xDB
+{0x00,0x00,0x00,0x00,0x3F,0x3F,0x3F,0x3F}, // 0xDC
+{0x04,0x04,0x04,0x00,0x04,0x04,0x04,0x00}, // 0xDD
+{0x0C,0x00,0x0E,0x04,0x04,0x04,0x0E,0x00}, // 0xDE
+{0x3F,0x3F,0x3F,0x3F,0x00,0x00,0x00,0x00}, // 0xDF
+{0x06,0x0C,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0xE0
+{0x00,0x1C,0x12,0x1C,0x12,0x12,0x1C,0x10}, // 0xE1
+{0x0E,0x0C,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0xE2
+{0x18,0x0C,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0xE3
+{0x0A,0x14,0x00,0x0C,0x12,0x12,0x0C,0x00}, // 0xE4
+{0x0A,0x14,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0xE5
+{0x00,0x00,0x12,0x12,0x12,0x1C,0x10,0x10}, // 0xE6
+{0x00,0x18,0x10,0x1C,0x12,0x1C,0x10,0x18}, // 0xE7
+{0x18,0x10,0x1C,0x12,0x12,0x1C,0x10,0x18}, // 0xE8
+{0x06,0x00,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0xE9
+{0x0E,0x00,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0xEA
+{0x18,0x00,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0xEB
+{0x06,0x00,0x12,0x12,0x12,0x0E,0x04,0x18}, // 0xEC
+{0x06,0x00,0x11,0x0A,0x04,0x04,0x04,0x00}, // 0xED
+{0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEE
+{0x0C,0x0C,0x08,0x00,0x00,0x00,0x00,0x00}, // 0xEF
+{0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00}, // 0xF0
+{0x00,0x04,0x0E,0x04,0x00,0x0E,0x00,0x00}, // 0xF1
+{0x00,0x00,0x1F,0x00,0x00,0x1F,0x00,0x00}, // 0xF2
+{0x30,0x1A,0x34,0x0B,0x15,0x07,0x01,0x00}, // 0xF3
+{0x0F,0x15,0x15,0x0D,0x05,0x05,0x05,0x00}, // 0xF4
+{0x0E,0x11,0x0C,0x0A,0x06,0x11,0x0E,0x00}, // 0xF5
+{0x00,0x04,0x00,0x1F,0x00,0x04,0x00,0x00}, // 0xF6
+{0x00,0x00,0x00,0x0E,0x06,0x00,0x00,0x00}, // 0xF7
+{0x0C,0x12,0x12,0x0C,0x00,0x00,0x00,0x00}, // 0xF8
+{0x00,0x00,0x00,0x0A,0x00,0x00,0x00,0x00}, // 0xF9
+{0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00}, // 0xFA
+{0x08,0x18,0x08,0x08,0x00,0x00,0x00,0x00}, // 0xFB
+{0x1C,0x08,0x0C,0x18,0x00,0x00,0x00,0x00}, // 0xFC
+{0x18,0x04,0x08,0x1C,0x00,0x00,0x00,0x00}, // 0xFD
+{0x00,0x00,0x1E,0x1E,0x1E,0x1E,0x00,0x00}, // 0xFE
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} // 0xFF
+};
+
+#endif
\ No newline at end of file
diff --git a/tasmota/xdsp_19_max7219_matrix.ino b/tasmota/xdsp_19_max7219_matrix.ino
index da3177f59..bbd0a069d 100644
--- a/tasmota/xdsp_19_max7219_matrix.ino
+++ b/tasmota/xdsp_19_max7219_matrix.ino
@@ -175,31 +175,6 @@ bool MAX7291Matrix_init(void)
return true;
}
-// /*********************************************************************************************\
-// * Clears the display
-// * Command: DisplayText
-// \*********************************************************************************************/
-bool MAX7291Matrix_Text()
-{
- char sString[CMD_MAX_LEN + 1];
- subStr(sString, XdrvMailbox.data, ",", 1);
- max7219_Matrix->clear();
- AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: sString %s"), sString);
-
- // test
- uint8_t length = strlen(sString);
- //if(length > modulesPerRow)
- length = modulesPerRow;
-
- for (int addr = 0; addr < length; addr++)
- {
- max7219_Matrix->setPixel(addr, addr, true);
- AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: setPixel() %d, %d)"), addr, addr);
- }
-
- return true;
-}
-
bool Xdsp19(uint8_t function)
{
bool result = false;
@@ -216,7 +191,7 @@ bool Xdsp19(uint8_t function)
result = true;
break;
case FUNC_DISPLAY_CLEAR:
- result = max7219_Matrix->clear();
+ result = max7219_Matrix->clearDisplay();
break;
case FUNC_DISPLAY_DIM:
result = max7219_Matrix->setIntensity(GetDisplayDimmer16());
@@ -232,12 +207,13 @@ bool Xdsp19(uint8_t function)
case FUNC_DISPLAY_SCROLLTEXT:
case FUNC_DISPLAY_CLOCK:
case FUNC_DISPLAY_DRAW_STRING:
- result = MAX7291Matrix_Text();
+ result = max7219_Matrix->drawText(dsp_str);
+ break;
+ case FUNC_DISPLAY_EVERY_SECOND:
+ //result = max7219_Matrix->scrollText();
break;
case FUNC_DISPLAY_EVERY_50_MSECOND:
- case FUNC_DISPLAY_EVERY_SECOND:
- // ignore
- return false;
+ result = max7219_Matrix->scrollText();
default:
result = false;
}
From c4a4bb0ff8ed1cae90237587cbcae0ba091295b8 Mon Sep 17 00:00:00 2001
From: Michael
Date: Tue, 23 Nov 2021 23:08:05 +0100
Subject: [PATCH 007/402] scroll works
---
lib/lib_display/LedControl/src/LedMatrix.cpp | 11 +-
lib/lib_display/LedControl/src/LedMatrix.h | 6 +-
tasmota/tasmota_template.h | 1 +
tasmota/xdsp_19_max7219_matrix.ino | 110 +++++++++++++++----
4 files changed, 102 insertions(+), 26 deletions(-)
diff --git a/lib/lib_display/LedControl/src/LedMatrix.cpp b/lib/lib_display/LedControl/src/LedMatrix.cpp
index 19ac0dcb2..80ded02e2 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.cpp
+++ b/lib/lib_display/LedControl/src/LedMatrix.cpp
@@ -62,6 +62,11 @@ LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, un
setIntensity(7);
}
+void LedMatrix::power(bool on)
+{
+ shutdown(!on); // shut down on power off
+}
+
bool LedMatrix::drawText( const char *str)
{
strncpy(textBuf, str, TEXT_BUFFER_SIZE -1);
@@ -70,6 +75,7 @@ bool LedMatrix::drawText( const char *str)
textWidth = strlen(textBuf) * charWidth;
if(textWidth < displayWidth)
{
+ clear();
textPosX = (displayWidth - textWidth) / 2; // center
}
else
@@ -78,7 +84,6 @@ bool LedMatrix::drawText( const char *str)
// Append a space between end of text and the beginning of the repeting text.
appendSpace();
}
- clear();
drawTextAt(textBuf, textPosX, textPosY);
refresh(); // refresh display with new string content
return true;
@@ -102,7 +107,7 @@ bool LedMatrix::scrollText()
if(textWidth < displayWidth) return false; // do not scroll when text fits into the display
textPosX--;
- if(textPosX + textWidth < 0)
+ if(textPosX + textWidth < (int)0)
{
textPosX = 0; // start from the beginning after text scrolled out of display;
}
@@ -255,7 +260,7 @@ void LedMatrix::refresh()
void LedMatrix::refreshByteOfBuffer(int i)
{
int line = i / modulesPerRow;
- int addr = line / 8 + i % modulesPerRow;
+ int addr = (line / 8) * modulesPerRow + i % modulesPerRow;
byte b = buffer[i];
if (moduleOrientation == ORIENTATION_NORMAL || moduleOrientation == ORIENTATION_UPSIDE_DOWN)
{
diff --git a/lib/lib_display/LedControl/src/LedMatrix.h b/lib/lib_display/LedControl/src/LedMatrix.h
index 586a06146..1d251030b 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.h
+++ b/lib/lib_display/LedControl/src/LedMatrix.h
@@ -60,11 +60,11 @@ class LedMatrix
ModuleOrientation moduleOrientation;
byte buffer[MATRIX_BUFFER_SIZE];
LedControl* ledControl;
- const unsigned int charWidth = 6;
- const unsigned int charHeight = 8;
+ const int charWidth = 6;
+ const int charHeight = 8;
char textBuf[TEXT_BUFFER_SIZE];
char appendTextBuf[TEXT_APPEND_BUFFER_SIZE];
- unsigned int textWidth; // width of text [pixel]
+ int textWidth; // width of text [pixel]
int textPosX; // horizontal pixel position of scrolling text
int textPosY; // vertical pixelposition of scrolling text;
diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h
index e3f3256fc..13fdf23e4 100644
--- a/tasmota/tasmota_template.h
+++ b/tasmota/tasmota_template.h
@@ -524,6 +524,7 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#ifdef USE_DISPLAY_MAX7219_MATRIX
#undef USE_DISPLAY_MAX7219
#undef USE_DISPLAY_TM1637
+ #define USE_DISPLAY_MODES1TO5
AGPIO(GPIO_MAX7219CLK),
AGPIO(GPIO_MAX7219DIN),
AGPIO(GPIO_MAX7219CS),
diff --git a/tasmota/xdsp_19_max7219_matrix.ino b/tasmota/xdsp_19_max7219_matrix.ino
index bbd0a069d..ec82420e2 100644
--- a/tasmota/xdsp_19_max7219_matrix.ino
+++ b/tasmota/xdsp_19_max7219_matrix.ino
@@ -131,16 +131,22 @@ and setting it to 3 alternates between time and date.
\*********************************************************************************************/
#define XDSP_19 19
-#define CMD_MAX_LEN 55
+#include
#include
-LedMatrix *max7219_Matrix;
-bool max2791Matrix_init_done = false;
-byte modulesPerRow = 4;
-byte modulesPerCol = 1;
+LedMatrix *max7219_Matrix = nullptr;
+bool max2791Matrix_initDriver_done = false;
+struct
+{
+ byte modulesPerRow = 4;
+ byte modulesPerCol = 1;
+ bool show_clock = false;
+ const char* timeFormat;
-bool MAX7291Matrix_init(void)
+} LedMatrix_settings;
+
+bool MAX7291Matrix_initDriver(void)
{
if (!PinUsed(GPIO_MAX7219DIN) || !PinUsed(GPIO_MAX7219CLK) || !PinUsed(GPIO_MAX7219CS))
{
@@ -151,27 +157,79 @@ bool MAX7291Matrix_init(void)
Settings->display_model = XDSP_19;
if (Settings->display_width) // [pixel]
{
- modulesPerRow = (Settings->display_width - 1) / 8 + 1;
+ LedMatrix_settings.modulesPerRow = (Settings->display_width - 1) / 8 + 1;
}
- Settings->display_width = 8 * modulesPerRow;
+ Settings->display_width = 8 * LedMatrix_settings.modulesPerRow;
Settings->display_cols[0] = Settings->display_width;
if (Settings->display_height) // [pixel]
{
- modulesPerCol = (Settings->display_height - 1) / 8 + 1;
+ LedMatrix_settings.modulesPerCol = (Settings->display_height - 1) / 8 + 1;
}
- Settings->display_height = 8 * modulesPerCol;
+ Settings->display_height = 8 * LedMatrix_settings. modulesPerCol;
Settings->display_rows = Settings->display_height;
Settings->display_cols[1] = Settings->display_height;
- max7219_Matrix = new LedMatrix(Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), modulesPerRow, modulesPerCol);
+ max7219_Matrix = new LedMatrix(Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), LedMatrix_settings.modulesPerRow, LedMatrix_settings.modulesPerCol);
+ max2791Matrix_initDriver_done = true;
+
+ return MAX7291Matrix_init();
+}
+
+bool MAX7291Matrix_init(void)
+{
int intensity = GetDisplayDimmer16(); // 0..15
max7219_Matrix->setIntensity(intensity);
int orientation = Settings->display_rotate;
max7219_Matrix->setOrientation((LedMatrix::ModuleOrientation)orientation );
- AddLog(LOG_LEVEL_INFO, PSTR("DSP: MAX7291Matrix_init %dx%d modules, orientation: %d, intensity: %d"), modulesPerRow , modulesPerCol, orientation, intensity);
- max2791Matrix_init_done = true;
+ AddLog(LOG_LEVEL_INFO, PSTR("MTX: MAX7291Matrix_init %dx%d modules, orientation: %d, intensity: %d"), LedMatrix_settings.modulesPerRow , LedMatrix_settings.modulesPerCol, orientation, intensity);
- max7219_Matrix->test();
- AddLog(LOG_LEVEL_INFO, PSTR("DSP: display test"));
+ //max7219_Matrix->test();
+ AddLog(LOG_LEVEL_INFO, PSTR("MTX: display test"));
+ return true;
+}
+
+bool MAX7291Matrix_clock(void)
+{
+ LedMatrix_settings.show_clock = XdrvMailbox.payload;
+ if (ArgC() == 0)
+ XdrvMailbox.payload = 1;
+ if (XdrvMailbox.payload > 1)
+ {
+ LedMatrix_settings.timeFormat = "%H:%M";
+ if(LedMatrix_settings.modulesPerRow > 6)
+ {
+ LedMatrix_settings.timeFormat = "%H:%M:%S";
+ }
+ XdrvMailbox.payload = 2;
+ }
+ else
+ {
+ LedMatrix_settings.timeFormat = "%I:%M";
+ if(LedMatrix_settings.modulesPerRow > 6)
+ {
+ LedMatrix_settings.timeFormat = "%I:%M:%S";
+ }
+ XdrvMailbox.payload = 1;
+ }
+
+ AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: LedMatrix_settings.show_clock %d, timeFormat %s"), LedMatrix_settings.show_clock, LedMatrix_settings.timeFormat);
+
+ //max7219_Matrix->clearDisplay();
+ MAX7291Matrix_showTime();
+ return true;
+}
+
+bool MAX7291Matrix_showTime()
+{
+ time_t rawtime;
+ struct tm *timeinfo;
+ char timeStr[10];
+
+ time(&rawtime);
+ timeinfo = localtime(&rawtime);
+ strftime(timeStr, 10, LedMatrix_settings.timeFormat, timeinfo);
+ //AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: showTime:%s"), timeStr);
+
+ max7219_Matrix->drawText(timeStr);
return true;
}
@@ -179,14 +237,20 @@ bool Xdsp19(uint8_t function)
{
bool result = false;
- if (FUNC_DISPLAY_INIT_DRIVER == function)
+ if (FUNC_DISPLAY_INIT_DRIVER == function && !max2791Matrix_initDriver_done )
{
- result = MAX7291Matrix_init();
+ result = MAX7291Matrix_initDriver();
}
- else if (max7219_Matrix && (XDSP_19 == Settings->display_model))
+ else if (max2791Matrix_initDriver_done && max7219_Matrix && (XDSP_19 == Settings->display_model))
{
switch (function)
{
+ case FUNC_DISPLAY_INIT:
+ result = MAX7291Matrix_init();
+ break;
+ case FUNC_DISPLAY_POWER:
+ max7219_Matrix->power(disp_power!=0);
+ break;
case FUNC_DISPLAY_MODEL:
result = true;
break;
@@ -196,6 +260,9 @@ bool Xdsp19(uint8_t function)
case FUNC_DISPLAY_DIM:
result = max7219_Matrix->setIntensity(GetDisplayDimmer16());
break;
+ case FUNC_DISPLAY_CLOCK:
+ result = MAX7291Matrix_clock();
+ break;
case FUNC_DISPLAY_SEVENSEG_TEXT:
case FUNC_DISPLAY_SEVENSEG_TEXTNC:
case FUNC_DISPLAY_NUMBER:
@@ -205,12 +272,15 @@ bool Xdsp19(uint8_t function)
case FUNC_DISPLAY_RAW:
case FUNC_DISPLAY_LEVEL:
case FUNC_DISPLAY_SCROLLTEXT:
- case FUNC_DISPLAY_CLOCK:
case FUNC_DISPLAY_DRAW_STRING:
result = max7219_Matrix->drawText(dsp_str);
break;
case FUNC_DISPLAY_EVERY_SECOND:
- //result = max7219_Matrix->scrollText();
+ if (LedMatrix_settings.show_clock)
+ {
+ result = MAX7291Matrix_showTime();
+ }
+
break;
case FUNC_DISPLAY_EVERY_50_MSECOND:
result = max7219_Matrix->scrollText();
From f2f6eba00989f03a403f5652d93746ab24adfd9d Mon Sep 17 00:00:00 2001
From: Michael
Date: Wed, 24 Nov 2021 17:24:40 +0100
Subject: [PATCH 008/402] ready for ESP32
---
lib/lib_display/LedControl/src/LedMatrix.cpp | 119 +++-----
lib/lib_display/LedControl/src/LedMatrix.h | 208 +++++++-------
.../LedControl/src/font_5x8_horizontal_MSB.h | 3 +
.../LedControl/src/font_6x8_horizontal_MSB.h | 3 +
.../src/font_8x8_horizontal_latin_MSB.h | 265 ++++++++++++++++++
tasmota/tasmota_template.h | 1 -
tasmota/xdsp_19_max7219_matrix.ino | 201 +++++++------
7 files changed, 515 insertions(+), 285 deletions(-)
create mode 100644 lib/lib_display/LedControl/src/font_8x8_horizontal_latin_MSB.h
diff --git a/lib/lib_display/LedControl/src/LedMatrix.cpp b/lib/lib_display/LedControl/src/LedMatrix.cpp
index 80ded02e2..b4fb8c260 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.cpp
+++ b/lib/lib_display/LedControl/src/LedMatrix.cpp
@@ -1,5 +1,5 @@
/*
- * LedMatrix.h - Extends the Library LedControl for multiple LED dot matrix modules, based on MAX7219/MAX7221
+ * LedMatrix.h - Extends the Library LedControl for multiple 8x8 LED dot matrix modules, based on MAX7219/MAX7221
* Copyright (c) 2021 Michael Beuss
*
* Permission is hereby granted, free of charge, to any person
@@ -25,7 +25,9 @@
*/
#include "LedMatrix.h"
+//#include "font_5x8_horizontal_MSB.h"
#include "font_6x8_horizontal_MSB.h"
+//#include "font_8x8_horizontal_latin_MSB.h"
// public
LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows)
@@ -44,13 +46,15 @@ LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, un
}
}
+ charWidth = font_char_width; // defined in header file of font
+ charHeight = font_char_height; // defined in header file of font
modulesPerRow = colums;
modulesPerCol = rows;
displayWidth = colums * 8;
displayHeight = rows * 8;
modules = colums * rows;
- moduleOrientation = ORIENTATION_UPSIDE_DOWN;
- ledControl = new LedControl(dataPin, clkPin, csPin, modules);
+ moduleOrientation = ORIENTATION_UPSIDE_DOWN; // use setOrientation() to turn it
+ ledControl = new LedControl(dataPin, clkPin, csPin, modules); // initializes all connected LED matrix modules
textBuf[0] = 0;
textWidth = 0;
textPosX = 0;
@@ -62,11 +66,6 @@ LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, un
setIntensity(7);
}
-void LedMatrix::power(bool on)
-{
- shutdown(!on); // shut down on power off
-}
-
bool LedMatrix::drawText( const char *str)
{
strncpy(textBuf, str, TEXT_BUFFER_SIZE -1);
@@ -75,6 +74,7 @@ bool LedMatrix::drawText( const char *str)
textWidth = strlen(textBuf) * charWidth;
if(textWidth < displayWidth)
{
+ // text fits into the display, place it into the center
clear();
textPosX = (displayWidth - textWidth) / 2; // center
}
@@ -85,7 +85,7 @@ bool LedMatrix::drawText( const char *str)
appendSpace();
}
drawTextAt(textBuf, textPosX, textPosY);
- refresh(); // refresh display with new string content
+ refresh(); // refresh display with the new drawed string content
return true;
}
@@ -116,36 +116,16 @@ bool LedMatrix::scrollText()
int startOfRepeatingTextPos = textPosX + textWidth;
if(startOfRepeatingTextPos < displayWidth)
{
- // Draw repeating text.
+ // draw repeating text
drawTextAt(textBuf, startOfRepeatingTextPos, textPosY);
}
refresh();
return true;
}
-bool LedMatrix::drawCharAt( char c, const int x, const int y)
+void LedMatrix::power(bool on)
{
- // ignore when the character position is not visible on the display
- bool visible = (
- x > 0 - (int)charWidth && x < (int)displayWidth &&
- y > 0 - (int)charHeight && y < (int)displayHeight
- );
- if (!visible) return false;
-
- // ignore the leading bits above charWidth of the font definition
- static const byte charOffset = 8 - charWidth;
-
- for (byte charY = 0; charY < charHeight; charY++)
- {
- char pixelRow = (font[c][charY]) << charOffset; // skip the first bits when the character width is smaller than 8 pixel
- for (byte charX = 0; charX < charWidth; charX++)
- {
- bool pixel = (pixelRow & 0x80); // pixel=true when upper bit is set
- setPixel(x + charX, y + charY, pixel);
- pixelRow = pixelRow << 1; // next pixel
- }
- }
- return true;
+ shutdown(!on); // power(false) shuts down the display with shutdown(true)
}
bool LedMatrix::clearDisplay(void)
@@ -157,17 +137,6 @@ bool LedMatrix::clearDisplay(void)
return true;
}
-
-bool LedMatrix::clear(void)
-{
- memset(buffer, 0, MATRIX_BUFFER_SIZE);
- for (int addr = 0; addr < modules; addr++)
- {
- ledControl->clearDisplay(addr);
- }
- return true;
-}
-
bool LedMatrix::setIntensity(byte dim)
{
for (int addr = 0; addr < modules; addr++)
@@ -208,38 +177,40 @@ bool LedMatrix::setPixel(const int x, const int y, bool on)
return true;
}
-void LedMatrix::test()
+void LedMatrix::refresh()
{
- /*
- const static byte testMatrix[] PROGMEM = {
- B00000010, B00111100, B00111100, B00001000,
- B00000110, B01000010, B01000010, B00010000,
- B00001010, B00000010, B00000010, B00100000,
- B00000010, B00000100, B00001100, B01000100,
- B00000010, B00011000, B00000010, B01111110,
- B00000010, B00100000, B01000010, B00000100,
- B00000000, B01111110, B00111100, B00000100,
- B00000000, B00000000, B00000000, B00000000,
- };
- for (int i = 0; i < 32; i++)
+ for (int i = 0; i < modulesPerRow * displayHeight; i++)
{
- buffer[i] = testMatrix[i];
+ refreshByteOfBuffer(i);
}
- refresh();
- */
- drawText("1234567890");
- delay(1000);
- for( int i=0; i<320; i++)
- {
- delay(50);
- scrollText();
- }
- //drawCharAt(0x31, 1, 0);
- //setPixel(1,30);
- //refresh();
}
-// private
+// private functions
+bool LedMatrix::drawCharAt( char c, const int x, const int y)
+{
+ // ignore when the character position is not visible on the display
+ bool visible = (
+ x > 0 - (int)charWidth && x < (int)displayWidth &&
+ y > 0 - (int)charHeight && y < (int)displayHeight
+ );
+ if (!visible) return false;
+
+ // ignore the leading bits above charWidth of the font definition
+ static const byte charOffset = 8 - charWidth;
+
+ for (byte charY = 0; charY < charHeight; charY++)
+ {
+ char pixelRow = (font[c][charY]) << charOffset; // skip the first bits when the character width is smaller than 8 pixel
+ for (byte charX = 0; charX < charWidth; charX++)
+ {
+ bool pixel = (pixelRow & 0x80); // pixel=true when upper bit is set
+ setPixel(x + charX, y + charY, pixel);
+ pixelRow = pixelRow << 1; // next pixel
+ }
+ }
+ return true;
+}
+
bool LedMatrix::shutdown(bool b)
{
for (int addr = 0; addr < modules; addr++)
@@ -249,12 +220,14 @@ bool LedMatrix::shutdown(bool b)
return true;
}
-void LedMatrix::refresh()
+bool LedMatrix::clear(void)
{
- for (int i = 0; i < modulesPerRow * displayHeight; i++)
+ memset(buffer, 0, MATRIX_BUFFER_SIZE);
+ for (int addr = 0; addr < modules; addr++)
{
- refreshByteOfBuffer(i);
+ ledControl->clearDisplay(addr);
}
+ return true;
}
void LedMatrix::refreshByteOfBuffer(int i)
diff --git a/lib/lib_display/LedControl/src/LedMatrix.h b/lib/lib_display/LedControl/src/LedMatrix.h
index 1d251030b..efb50b8e3 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.h
+++ b/lib/lib_display/LedControl/src/LedMatrix.h
@@ -1,5 +1,5 @@
/*
- * LedMatrix.h - Extends the Library LedControl for multiple LED dot matrix modules, based on MAX7219/MAX7221
+ * LedMatrix.h - Extends the Library LedControl for multiple 8x8 LED dot matrix modules, based on MAX7219/MAX7221
* Copyright (c) 2021 Michael Beuss
*
* Permission is hereby granted, free of charge, to any person
@@ -29,21 +29,21 @@
#include
-#define MATRIX_MAX_MODULES 32
+#define MATRIX_MAX_MODULES 32 // maximum number of modules that can be used
#define MATRIX_BUFFER_SIZE MATRIX_MAX_MODULES * 8 // 8 bytes per modul. One byte represents 8 LEDs.
-#define TEXT_BUFFER_SIZE 256
-#define TEXT_APPEND_BUFFER_SIZE 16
+#define TEXT_BUFFER_SIZE 256 // maximum text length that can be scrolled
+#define TEXT_APPEND_BUFFER_SIZE 16 // used for characters that are appended to the scroll text, before it repeats
/**
* @brief LedMatric controls multiple 8x8 LED dot matrx modules.
- * All modules in rows and clolums together build a common matrix.
+ * All modules in rows and clolums together build a common display pixel matrix.
*
*/
class LedMatrix
{
public:
- enum ModuleOrientation // orientation of 8x8 LED dot matrix mdules (first module is top left)
+ enum ModuleOrientation // orientation of 8x8 LED dot matrix mdules (first module starts at top left)
{
ORIENTATION_NORMAL, // first pixel is on top left, no turn is necessary
ORIENTATION_TURN_RIGHT, // first pixel is on bottom left, for correction it has to turn 90° right
@@ -51,6 +51,100 @@ class LedMatrix
ORIENTATION_TURN_LEFT, // first pixel is on top right, for correction is has to turn 90° left.
};
+ public:
+ /**
+ * @brief Construct a new LED Matrix object
+ *
+ * @param colums of 8x8 LED dot matrix modules
+ * @param rows of 8x8 LED dot matrix modules
+ */
+ LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows);
+
+ /**
+ * @brief Draws a string to the display.
+ * When the text fits into the display, it will be shown in the center.
+ * When the text is longer than than the display width, it can be scrolled per pixel with function scrollText().
+ *
+ * @param str string to display
+ */
+ bool drawText( const char *str );
+
+ /**
+ * @brief Dwaws a character string to a defined display position. The position (x,y) is used for the upper left pixel of the text.
+ * Existing text before the x position will not be cleared. Use refresh() after all text parts are drawed.
+ *
+ * @param str string to display
+ * @param x horizantal pixel position to start with string (0 is most left)
+ * @param y vertical pixel position for the top position of the string (0 is top)
+ */
+ bool drawTextAt( const char *str, const int x, const int y );
+
+ /**
+ * @brief Scroll the current text one pixel to the left.
+ * Repeat with from start when end of text reached. This function can be called every 50 ms to get a propper scroll speed.
+ *
+ */
+ bool scrollText();
+
+ /**
+ * @brief switches the display on or off
+ *
+ * @param on true: on false: off
+ */
+
+ void power( bool on );
+
+ /**
+ * @brief cleares the display and text buffer
+ *
+ */
+ bool clearDisplay(void);
+
+ /**
+ * @brief Set the brightness of the display
+ *
+ * @param dim 0..15 (0: dark .. 15: light)
+ */
+ bool setIntensity(byte dim);
+
+ /**
+ * @brief Set the orientation of the 8x8 LED dot matrix module
+ *
+ * @param orientation
+ */
+ bool setOrientation(ModuleOrientation orientation);
+
+ /**
+ * @brief Set ap pixel at a defined position.
+ * After all Pixels are set, call refresh() to send it to the display.
+ *
+ * @param x horizontal position from left
+ * @param y vertical position from top
+ * @param on true: on, false: off
+ */
+
+ /**
+ * @brief Set the a pending string to the scrolling text to set a distance to the repeating text. Usually some spaces are used.
+ *
+ * @param append text to append to the scrolling text before repeating.
+ */
+ bool setScrollAppendText(const char* append );
+
+ bool setPixel( const int x, const int y, bool on=true);
+ /**
+ * @brief sends the changed content of the buffer to the display
+ *
+ */
+ void refresh();
+
+ private:
+ bool drawCharAt( char c, int x, int y ); // Draws a character to a defined position
+ bool shutdown(bool b); // shutdown(true) switches the display off. Text and pixels can be set while it is off. shutdown(false) switches the display on.
+ bool clear(void); // clears the display content
+ void refreshByteOfBuffer( int i); // sends one byte of the buffer to the display. This updates an 8 pixel row of one matrix module.
+ byte revereBitorder(byte b); // returnes the byte in the reverse bit order.
+ void appendSpace(); // appends characters to the end of the text to get a distance to the repeating scroll text
+
private:
unsigned int modulesPerRow;
unsigned int modulesPerCol;
@@ -60,112 +154,14 @@ class LedMatrix
ModuleOrientation moduleOrientation;
byte buffer[MATRIX_BUFFER_SIZE];
LedControl* ledControl;
- const int charWidth = 6;
- const int charHeight = 8;
+ int charWidth;
+ int charHeight;
char textBuf[TEXT_BUFFER_SIZE];
char appendTextBuf[TEXT_APPEND_BUFFER_SIZE];
int textWidth; // width of text [pixel]
int textPosX; // horizontal pixel position of scrolling text
int textPosY; // vertical pixelposition of scrolling text;
-
- public:
- /**
- * @brief Construct a new Led Matrix object
- *
- * @param colums of 8x8 LED dot matrix modules
- * @param rows of 8x8 LED dot matrix modules
- */
- LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows);
-
- /**
- * @brief Set all LEDs off.
- *
- */
- bool clearDisplay(void);
-
- /**
- * @brief Set the brightness of the display
- *
- * @param dim 0..15
- */
- bool setIntensity(byte dim);
-
- /**
- * @brief Set the a pending string to the scrolling text to set a distance to te repeating text. Usually some spaces.
- *
- * @param append text to append to the scrolling text before repeating.
- */
- bool setScrollAppendText(const char* append );
-
- /**
- * @brief Switches the display on or off
- *
- * @param on true: on false: off
- */
- void power( bool on );
-
- /**
- * @brief Set the orientation of the 8x8 LED dot matrix module
- *
- * @param orientation
- */
- bool setOrientation(ModuleOrientation orientation);
-
- /**
- * @brief draw a string to the display.
- * When the text fits into the size of the display, it will be shown in the center.
- * When the text is longer than than the display width, it can be scrolled per pixel with function scrollText().
- *
- * @param str string to display
- */
- bool drawText( const char *str );
-
- /**
- * @brief dwaws a character string to the display. The position (x,y) is used for the upper left pixtel of the text.
- * Existing text before the x position will not be cleared.
- *
- * @param str string to display
- * @param x horizantal pixel position to start with string (default 0)
- * @param y vertical pixel position for the top position of the string (default 0)
- */
- bool drawTextAt( const char *str, const int x, const int y );
-
- /**
- * @brief Scroll the current teext one picel to the left.
- * Repeat with from start when end of text reached.
- *
- */
- bool scrollText();
-
- /**
- * @brief Set the Pixel object
- *
- * @param x horizontal position from left
- * @param y vertical position from top
- * @param on true: on, false: off
- */
- bool setPixel( const int x, const int y, bool on=true);
- void test();
-
- private:
- bool drawCharAt( char c, int x, int y );
-
- bool shutdown(bool b);
- bool clear(void);
-
- /**
- * @brief sends the changed content of the buffer to the display
- *
- */
- void refresh();
-
- void refreshByteOfBuffer( int i);
-
- byte revereBitorder (byte b);
-
- void appendSpace();
-
};
#endif //LedMatrix_h
\ No newline at end of file
diff --git a/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h b/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
index 56df774a4..da3becc4e 100644
--- a/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
+++ b/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
@@ -2,6 +2,9 @@
#ifndef font_5x8_horizontal_MSB_h
#define font_5x8_horizontal_MSB_h
+const unsigned int font_char_width = 5;
+const unsigned int font_char_height = 8;
+
const char font[256][8]={
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
{0x0E,0x11,0x1B,0x11,0x1F,0x0E,0x00,0x00}, // 0x01
diff --git a/lib/lib_display/LedControl/src/font_6x8_horizontal_MSB.h b/lib/lib_display/LedControl/src/font_6x8_horizontal_MSB.h
index cc3a323cc..e5c522cd4 100644
--- a/lib/lib_display/LedControl/src/font_6x8_horizontal_MSB.h
+++ b/lib/lib_display/LedControl/src/font_6x8_horizontal_MSB.h
@@ -2,6 +2,9 @@
#ifndef font_6x8_horizontal_MSB_h
#define font_6x8_horizontal_MSB_h
+const unsigned int font_char_width = 6;
+const unsigned int font_char_height = 8;
+
const char font[256][8]={
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
{0x0E,0x11,0x1B,0x11,0x15,0x11,0x0E,0x00}, // 0x01
diff --git a/lib/lib_display/LedControl/src/font_8x8_horizontal_latin_MSB.h b/lib/lib_display/LedControl/src/font_8x8_horizontal_latin_MSB.h
new file mode 100644
index 000000000..e1a8af7ae
--- /dev/null
+++ b/lib/lib_display/LedControl/src/font_8x8_horizontal_latin_MSB.h
@@ -0,0 +1,265 @@
+#ifndef font_8x8_horizontal_latin_MSB_h
+#define font_8x8_horizontal_latin_MSB_h
+
+const unsigned int font_char_width = 8;
+const unsigned int font_char_height = 8;
+
+const char font[256][8]={
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
+{0x0E,0x11,0x1B,0x11,0x15,0x11,0x0E,0x00}, // 0x01
+{0x0E,0x1F,0x15,0x1F,0x11,0x1F,0x0E,0x00}, // 0x02
+{0x00,0x0A,0x1F,0x1F,0x1F,0x0E,0x04,0x00}, // 0x03
+{0x00,0x04,0x0E,0x1F,0x1F,0x0E,0x04,0x00}, // 0x04
+{0x04,0x0E,0x0E,0x04,0x1F,0x1F,0x04,0x00}, // 0x05
+{0x00,0x04,0x0E,0x1F,0x1F,0x04,0x0E,0x00}, // 0x06
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
+{0x00,0x07,0x03,0x0D,0x12,0x12,0x0C,0x00}, // 0x0B
+{0x0E,0x11,0x11,0x0E,0x04,0x0E,0x04,0x00}, // 0x0C
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
+{0x03,0x0D,0x0B,0x0D,0x0B,0x1B,0x18,0x00}, // 0x0E
+{0x00,0x15,0x0E,0x1B,0x0E,0x15,0x00,0x00}, // 0x0F
+{0x08,0x0C,0x0E,0x0F,0x0E,0x0C,0x08,0x00}, // 0x10
+{0x02,0x06,0x0E,0x1E,0x0E,0x06,0x02,0x00}, // 0x11
+{0x04,0x0E,0x1F,0x04,0x1F,0x0E,0x04,0x00}, // 0x12
+{0x0A,0x0A,0x0A,0x0A,0x0A,0x00,0x0A,0x00}, // 0x13
+{0x0F,0x15,0x15,0x0D,0x05,0x05,0x05,0x00}, // 0x14
+{0x0E,0x11,0x0C,0x0A,0x06,0x11,0x0E,0x00}, // 0x15
+{0x00,0x00,0x00,0x00,0x00,0x1E,0x1E,0x00}, // 0x16
+{0x04,0x0E,0x1F,0x04,0x1F,0x0E,0x04,0x0E}, // 0x17
+{0x04,0x0E,0x1F,0x04,0x04,0x04,0x04,0x00}, // 0x18
+{0x04,0x04,0x04,0x04,0x1F,0x0E,0x04,0x00}, // 0x19
+{0x00,0x04,0x06,0x1F,0x06,0x04,0x00,0x00}, // 0x1A
+{0x00,0x04,0x0C,0x1F,0x0C,0x04,0x00,0x00}, // 0x1B
+{0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x00}, // 0x1C
+{0x00,0x0A,0x0A,0x1F,0x0A,0x0A,0x00,0x00}, // 0x1D
+{0x04,0x04,0x0E,0x0E,0x1F,0x1F,0x00,0x00}, // 0x1E
+{0x1F,0x1F,0x0E,0x0E,0x04,0x04,0x00,0x00}, // 0x1F
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0020 (space)
+ { 0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00}, // U+0021 (!)
+ { 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0022 (")
+ { 0x36, 0x36, 0x7F, 0x36, 0x7F, 0x36, 0x36, 0x00}, // U+0023 (#)
+ { 0x0C, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x0C, 0x00}, // U+0024 ($)
+ { 0x00, 0x63, 0x33, 0x18, 0x0C, 0x66, 0x63, 0x00}, // U+0025 (%)
+ { 0x1C, 0x36, 0x1C, 0x6E, 0x3B, 0x33, 0x6E, 0x00}, // U+0026 (&)
+ { 0x06, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0027 (')
+ { 0x18, 0x0C, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x00}, // U+0028 (()
+ { 0x06, 0x0C, 0x18, 0x18, 0x18, 0x0C, 0x06, 0x00}, // U+0029 ())
+ { 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00}, // U+002A (*)
+ { 0x00, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x00, 0x00}, // U+002B (+)
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+002C (,)
+ { 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00}, // U+002D (-)
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+002E (.)
+ { 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00}, // U+002F (/)
+ { 0x3E, 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x3E, 0x00}, // U+0030 (0)
+ { 0x0C, 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x3F, 0x00}, // U+0031 (1)
+ { 0x1E, 0x33, 0x30, 0x1C, 0x06, 0x33, 0x3F, 0x00}, // U+0032 (2)
+ { 0x1E, 0x33, 0x30, 0x1C, 0x30, 0x33, 0x1E, 0x00}, // U+0033 (3)
+ { 0x38, 0x3C, 0x36, 0x33, 0x7F, 0x30, 0x78, 0x00}, // U+0034 (4)
+ { 0x3F, 0x03, 0x1F, 0x30, 0x30, 0x33, 0x1E, 0x00}, // U+0035 (5)
+ { 0x1C, 0x06, 0x03, 0x1F, 0x33, 0x33, 0x1E, 0x00}, // U+0036 (6)
+ { 0x3F, 0x33, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x00}, // U+0037 (7)
+ { 0x1E, 0x33, 0x33, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+0038 (8)
+ { 0x1E, 0x33, 0x33, 0x3E, 0x30, 0x18, 0x0E, 0x00}, // U+0039 (9)
+ { 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+003A (:)
+ { 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+003B (;)
+ { 0x18, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x18, 0x00}, // U+003C (<)
+ { 0x00, 0x00, 0x3F, 0x00, 0x00, 0x3F, 0x00, 0x00}, // U+003D (=)
+ { 0x06, 0x0C, 0x18, 0x30, 0x18, 0x0C, 0x06, 0x00}, // U+003E (>)
+ { 0x1E, 0x33, 0x30, 0x18, 0x0C, 0x00, 0x0C, 0x00}, // U+003F (?)
+ { 0x3E, 0x63, 0x7B, 0x7B, 0x7B, 0x03, 0x1E, 0x00}, // U+0040 (@)
+ { 0x0C, 0x1E, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x00}, // U+0041 (A)
+ { 0x3F, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3F, 0x00}, // U+0042 (B)
+ { 0x3C, 0x66, 0x03, 0x03, 0x03, 0x66, 0x3C, 0x00}, // U+0043 (C)
+ { 0x1F, 0x36, 0x66, 0x66, 0x66, 0x36, 0x1F, 0x00}, // U+0044 (D)
+ { 0x7F, 0x46, 0x16, 0x1E, 0x16, 0x46, 0x7F, 0x00}, // U+0045 (E)
+ { 0x7F, 0x46, 0x16, 0x1E, 0x16, 0x06, 0x0F, 0x00}, // U+0046 (F)
+ { 0x3C, 0x66, 0x03, 0x03, 0x73, 0x66, 0x7C, 0x00}, // U+0047 (G)
+ { 0x33, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x33, 0x00}, // U+0048 (H)
+ { 0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0049 (I)
+ { 0x78, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E, 0x00}, // U+004A (J)
+ { 0x67, 0x66, 0x36, 0x1E, 0x36, 0x66, 0x67, 0x00}, // U+004B (K)
+ { 0x0F, 0x06, 0x06, 0x06, 0x46, 0x66, 0x7F, 0x00}, // U+004C (L)
+ { 0x63, 0x77, 0x7F, 0x7F, 0x6B, 0x63, 0x63, 0x00}, // U+004D (M)
+ { 0x63, 0x67, 0x6F, 0x7B, 0x73, 0x63, 0x63, 0x00}, // U+004E (N)
+ { 0x1C, 0x36, 0x63, 0x63, 0x63, 0x36, 0x1C, 0x00}, // U+004F (O)
+ { 0x3F, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x0F, 0x00}, // U+0050 (P)
+ { 0x1E, 0x33, 0x33, 0x33, 0x3B, 0x1E, 0x38, 0x00}, // U+0051 (Q)
+ { 0x3F, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x67, 0x00}, // U+0052 (R)
+ { 0x1E, 0x33, 0x07, 0x0E, 0x38, 0x33, 0x1E, 0x00}, // U+0053 (S)
+ { 0x3F, 0x2D, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0054 (T)
+ { 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x00}, // U+0055 (U)
+ { 0x33, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0056 (V)
+ { 0x63, 0x63, 0x63, 0x6B, 0x7F, 0x77, 0x63, 0x00}, // U+0057 (W)
+ { 0x63, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x00}, // U+0058 (X)
+ { 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x0C, 0x1E, 0x00}, // U+0059 (Y)
+ { 0x7F, 0x63, 0x31, 0x18, 0x4C, 0x66, 0x7F, 0x00}, // U+005A (Z)
+ { 0x1E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x1E, 0x00}, // U+005B ([)
+ { 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40, 0x00}, // U+005C (\)
+ { 0x1E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1E, 0x00}, // U+005D (])
+ { 0x08, 0x1C, 0x36, 0x63, 0x00, 0x00, 0x00, 0x00}, // U+005E (^)
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF}, // U+005F (_)
+ { 0x0C, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0060 (`)
+ { 0x00, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x6E, 0x00}, // U+0061 (a)
+ { 0x07, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00}, // U+0062 (b)
+ { 0x00, 0x00, 0x1E, 0x33, 0x03, 0x33, 0x1E, 0x00}, // U+0063 (c)
+ { 0x38, 0x30, 0x30, 0x3e, 0x33, 0x33, 0x6E, 0x00}, // U+0064 (d)
+ { 0x00, 0x00, 0x1E, 0x33, 0x3f, 0x03, 0x1E, 0x00}, // U+0065 (e)
+ { 0x1C, 0x36, 0x06, 0x0f, 0x06, 0x06, 0x0F, 0x00}, // U+0066 (f)
+ { 0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0067 (g)
+ { 0x07, 0x06, 0x36, 0x6E, 0x66, 0x66, 0x67, 0x00}, // U+0068 (h)
+ { 0x0C, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0069 (i)
+ { 0x30, 0x00, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E}, // U+006A (j)
+ { 0x07, 0x06, 0x66, 0x36, 0x1E, 0x36, 0x67, 0x00}, // U+006B (k)
+ { 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+006C (l)
+ { 0x00, 0x00, 0x33, 0x7F, 0x7F, 0x6B, 0x63, 0x00}, // U+006D (m)
+ { 0x00, 0x00, 0x1F, 0x33, 0x33, 0x33, 0x33, 0x00}, // U+006E (n)
+ { 0x00, 0x00, 0x1E, 0x33, 0x33, 0x33, 0x1E, 0x00}, // U+006F (o)
+ { 0x00, 0x00, 0x3B, 0x66, 0x66, 0x3E, 0x06, 0x0F}, // U+0070 (p)
+ { 0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x78}, // U+0071 (q)
+ { 0x00, 0x00, 0x3B, 0x6E, 0x66, 0x06, 0x0F, 0x00}, // U+0072 (r)
+ { 0x00, 0x00, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x00}, // U+0073 (s)
+ { 0x08, 0x0C, 0x3E, 0x0C, 0x0C, 0x2C, 0x18, 0x00}, // U+0074 (t)
+ { 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x6E, 0x00}, // U+0075 (u)
+ { 0x00, 0x00, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0076 (v)
+ { 0x00, 0x00, 0x63, 0x6B, 0x7F, 0x7F, 0x36, 0x00}, // U+0077 (w)
+ { 0x00, 0x00, 0x63, 0x36, 0x1C, 0x36, 0x63, 0x00}, // U+0078 (x)
+ { 0x00, 0x00, 0x33, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0079 (y)
+ { 0x00, 0x00, 0x3F, 0x19, 0x0C, 0x26, 0x3F, 0x00}, // U+007A (z)
+ { 0x38, 0x0C, 0x0C, 0x07, 0x0C, 0x0C, 0x38, 0x00}, // U+007B ({)
+ { 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, // U+007C (|)
+ { 0x07, 0x0C, 0x0C, 0x38, 0x0C, 0x0C, 0x07, 0x00}, // U+007D (})
+ { 0x6E, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007E (~)
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007F{0x0E,0x11,0x10,0x10,0x11,0x0E,0x04,0x0C}, // 0x80
+{0x12,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x81
+{0x03,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x82
+{0x0E,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x83
+{0x0A,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x84
+{0x0C,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x85
+{0x0E,0x0A,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x86
+{0x00,0x0E,0x11,0x10,0x11,0x0E,0x04,0x0C}, // 0x87
+{0x0E,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x88
+{0x0A,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x89
+{0x0C,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x8A
+{0x0A,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8B
+{0x0E,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8C
+{0x08,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8D
+{0x0A,0x00,0x04,0x0A,0x11,0x1F,0x11,0x00}, // 0x8E
+{0x0E,0x0A,0x0E,0x1B,0x11,0x1F,0x11,0x00}, // 0x8F
+{0x03,0x00,0x1F,0x10,0x1E,0x10,0x1F,0x00}, // 0x90
+{0x00,0x00,0x1E,0x05,0x1F,0x14,0x0F,0x00}, // 0x91
+{0x0F,0x14,0x14,0x1F,0x14,0x14,0x17,0x00}, // 0x92
+{0x0E,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x93
+{0x0A,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x94
+{0x18,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x95
+{0x0E,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x96
+{0x18,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x97
+{0x0A,0x00,0x12,0x12,0x12,0x0E,0x04,0x18}, // 0x98
+{0x12,0x0C,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0x99
+{0x0A,0x00,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0x9A
+{0x00,0x00,0x01,0x0E,0x16,0x1A,0x1C,0x20}, // 0x9B
+{0x06,0x09,0x08,0x1E,0x08,0x09,0x17,0x00}, // 0x9C
+{0x0F,0x13,0x15,0x15,0x15,0x19,0x1E,0x00}, // 0x9D
+{0x00,0x11,0x0A,0x04,0x0A,0x11,0x00,0x00}, // 0x9E
+{0x02,0x05,0x04,0x0E,0x04,0x04,0x14,0x08}, // 0x9F
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00A0 (no break space)
+ { 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00}, // U+00A1 (inverted !)
+ { 0x18, 0x18, 0x7E, 0x03, 0x03, 0x7E, 0x18, 0x18}, // U+00A2 (dollarcents)
+ { 0x1C, 0x36, 0x26, 0x0F, 0x06, 0x67, 0x3F, 0x00}, // U+00A3 (pound sterling)
+ { 0x00, 0x00, 0x63, 0x3E, 0x36, 0x3E, 0x63, 0x00}, // U+00A4 (currency mark)
+ { 0x33, 0x33, 0x1E, 0x3F, 0x0C, 0x3F, 0x0C, 0x0C}, // U+00A5 (yen)
+ { 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, // U+00A6 (broken pipe)
+ { 0x7C, 0xC6, 0x1C, 0x36, 0x36, 0x1C, 0x33, 0x1E}, // U+00A7 (paragraph)
+ { 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00A8 (diaeresis)
+ { 0x3C, 0x42, 0x99, 0x85, 0x85, 0x99, 0x42, 0x3C}, // U+00A9 (copyright symbol)
+ { 0x3C, 0x36, 0x36, 0x7C, 0x00, 0x00, 0x00, 0x00}, // U+00AA (superscript a)
+ { 0x00, 0xCC, 0x66, 0x33, 0x66, 0xCC, 0x00, 0x00}, // U+00AB (<<)
+ { 0x00, 0x00, 0x00, 0x3F, 0x30, 0x30, 0x00, 0x00}, // U+00AC (gun pointing left)
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00AD (soft hyphen)
+ { 0x3C, 0x42, 0x9D, 0xA5, 0x9D, 0xA5, 0x42, 0x3C}, // U+00AE (registered symbol)
+ { 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00AF (macron)
+ { 0x1C, 0x36, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00}, // U+00B0 (degree)
+ { 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x7E, 0x00}, // U+00B1 (plusminus)
+ { 0x1C, 0x30, 0x18, 0x0C, 0x3C, 0x00, 0x00, 0x00}, // U+00B2 (superscript 2)
+ { 0x1C, 0x30, 0x18, 0x30, 0x1C, 0x00, 0x00, 0x00}, // U+00B2 (superscript 3)
+ { 0x18, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00B2 (aigu)
+ { 0x00, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x06, 0x03}, // U+00B5 (mu)
+ { 0xFE, 0xDB, 0xDB, 0xDE, 0xD8, 0xD8, 0xD8, 0x00}, // U+00B6 (pilcrow)
+ { 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00}, // U+00B7 (central dot)
+ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x1E}, // U+00B8 (cedille)
+ { 0x08, 0x0C, 0x08, 0x1C, 0x00, 0x00, 0x00, 0x00}, // U+00B9 (superscript 1)
+ { 0x1C, 0x36, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00}, // U+00BA (superscript 0)
+ { 0x00, 0x33, 0x66, 0xCC, 0x66, 0x33, 0x00, 0x00}, // U+00BB (>>)
+ { 0xC3, 0x63, 0x33, 0xBD, 0xEC, 0xF6, 0xF3, 0x03}, // U+00BC (1/4)
+ { 0xC3, 0x63, 0x33, 0x7B, 0xCC, 0x66, 0x33, 0xF0}, // U+00BD (1/2)
+ { 0x03, 0xC4, 0x63, 0xB4, 0xDB, 0xAC, 0xE6, 0x80}, // U+00BE (3/4)
+ { 0x0C, 0x00, 0x0C, 0x06, 0x03, 0x33, 0x1E, 0x00}, // U+00BF (inverted ?)
+ { 0x07, 0x00, 0x1C, 0x36, 0x63, 0x7F, 0x63, 0x00}, // U+00C0 (A grave)
+ { 0x70, 0x00, 0x1C, 0x36, 0x63, 0x7F, 0x63, 0x00}, // U+00C1 (A aigu)
+ { 0x1C, 0x36, 0x00, 0x3E, 0x63, 0x7F, 0x63, 0x00}, // U+00C2 (A circumflex)
+ { 0x6E, 0x3B, 0x00, 0x3E, 0x63, 0x7F, 0x63, 0x00}, // U+00C3 (A ~)
+ { 0x63, 0x1C, 0x36, 0x63, 0x7F, 0x63, 0x63, 0x00}, // U+00C4 (A umlaut)
+ { 0x0C, 0x0C, 0x00, 0x1E, 0x33, 0x3F, 0x33, 0x00}, // U+00C5 (A ring)
+ { 0x7C, 0x36, 0x33, 0x7F, 0x33, 0x33, 0x73, 0x00}, // U+00C6 (AE)
+ { 0x1E, 0x33, 0x03, 0x33, 0x1E, 0x18, 0x30, 0x1E}, // U+00C7 (C cedille)
+ { 0x07, 0x00, 0x3F, 0x06, 0x1E, 0x06, 0x3F, 0x00}, // U+00C8 (E grave)
+ { 0x38, 0x00, 0x3F, 0x06, 0x1E, 0x06, 0x3F, 0x00}, // U+00C9 (E aigu)
+ { 0x0C, 0x12, 0x3F, 0x06, 0x1E, 0x06, 0x3F, 0x00}, // U+00CA (E circumflex)
+ { 0x36, 0x00, 0x3F, 0x06, 0x1E, 0x06, 0x3F, 0x00}, // U+00CB (E umlaut)
+ { 0x07, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00CC (I grave)
+ { 0x38, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00CD (I aigu)
+ { 0x0C, 0x12, 0x00, 0x1E, 0x0C, 0x0C, 0x1E, 0x00}, // U+00CE (I circumflex)
+ { 0x33, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00CF (I umlaut)
+ { 0x3F, 0x66, 0x6F, 0x6F, 0x66, 0x66, 0x3F, 0x00}, // U+00D0 (Eth)
+ { 0x3F, 0x00, 0x33, 0x37, 0x3F, 0x3B, 0x33, 0x00}, // U+00D1 (N ~)
+ { 0x0E, 0x00, 0x18, 0x3C, 0x66, 0x3C, 0x18, 0x00}, // U+00D2 (O grave)
+ { 0x70, 0x00, 0x18, 0x3C, 0x66, 0x3C, 0x18, 0x00}, // U+00D3 (O aigu)
+ { 0x3C, 0x66, 0x18, 0x3C, 0x66, 0x3C, 0x18, 0x00}, // U+00D4 (O circumflex)
+ { 0x6E, 0x3B, 0x00, 0x3E, 0x63, 0x63, 0x3E, 0x00}, // U+00D5 (O ~)
+ { 0xC3, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x18, 0x00}, // U+00D6 (O umlaut)
+ { 0x00, 0x36, 0x1C, 0x08, 0x1C, 0x36, 0x00, 0x00}, // U+00D7 (multiplicative x)
+ { 0x5C, 0x36, 0x73, 0x7B, 0x6F, 0x36, 0x1D, 0x00}, // U+00D8 (O stroke)
+ { 0x0E, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00}, // U+00D9 (U grave)
+ { 0x70, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00}, // U+00DA (U aigu)
+ { 0x3C, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x00}, // U+00DB (U circumflex)
+ { 0x33, 0x00, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x00}, // U+00DC (U umlaut)
+ { 0x70, 0x00, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x00}, // U+00DD (Y aigu)
+ { 0x0F, 0x06, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x0F}, // U+00DE (Thorn)
+ { 0x00, 0x1E, 0x33, 0x1F, 0x33, 0x1F, 0x03, 0x03}, // U+00DF (beta)
+ { 0x07, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E0 (a grave)
+ { 0x38, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E1 (a aigu)
+ { 0x7E, 0xC3, 0x3C, 0x60, 0x7C, 0x66, 0xFC, 0x00}, // U+00E2 (a circumflex)
+ { 0x6E, 0x3B, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E3 (a ~)
+ { 0x33, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E4 (a umlaut)
+ { 0x0C, 0x0C, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E5 (a ring)
+ { 0x00, 0x00, 0xFE, 0x30, 0xFE, 0x33, 0xFE, 0x00}, // U+00E6 (ae)
+ { 0x00, 0x00, 0x1E, 0x03, 0x03, 0x1E, 0x30, 0x1C}, // U+00E7 (c cedille)
+ { 0x07, 0x00, 0x1E, 0x33, 0x3F, 0x03, 0x1E, 0x00}, // U+00E8 (e grave)
+ { 0x38, 0x00, 0x1E, 0x33, 0x3F, 0x03, 0x1E, 0x00}, // U+00E9 (e aigu)
+ { 0x7E, 0xC3, 0x3C, 0x66, 0x7E, 0x06, 0x3C, 0x00}, // U+00EA (e circumflex)
+ { 0x33, 0x00, 0x1E, 0x33, 0x3F, 0x03, 0x1E, 0x00}, // U+00EB (e umlaut)
+ { 0x07, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00EC (i grave)
+ { 0x1C, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00ED (i augu)
+ { 0x3E, 0x63, 0x1C, 0x18, 0x18, 0x18, 0x3C, 0x00}, // U+00EE (i circumflex)
+ { 0x33, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00EF (i umlaut)
+ { 0x1B, 0x0E, 0x1B, 0x30, 0x3E, 0x33, 0x1E, 0x00}, // U+00F0 (eth)
+ { 0x00, 0x1F, 0x00, 0x1F, 0x33, 0x33, 0x33, 0x00}, // U+00F1 (n ~)
+ { 0x00, 0x07, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F2 (o grave)
+ { 0x00, 0x38, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F3 (o aigu)
+ { 0x1E, 0x33, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F4 (o circumflex)
+ { 0x6E, 0x3B, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F5 (o ~)
+ { 0x00, 0x33, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F6 (o umlaut)
+ { 0x18, 0x18, 0x00, 0x7E, 0x00, 0x18, 0x18, 0x00}, // U+00F7 (division)
+ { 0x00, 0x60, 0x3C, 0x76, 0x7E, 0x6E, 0x3C, 0x06}, // U+00F8 (o stroke)
+ { 0x00, 0x07, 0x00, 0x33, 0x33, 0x33, 0x7E, 0x00}, // U+00F9 (u grave)
+ { 0x00, 0x38, 0x00, 0x33, 0x33, 0x33, 0x7E, 0x00}, // U+00FA (u aigu)
+ { 0x1E, 0x33, 0x00, 0x33, 0x33, 0x33, 0x7E, 0x00}, // U+00FB (u circumflex)
+ { 0x00, 0x33, 0x00, 0x33, 0x33, 0x33, 0x7E, 0x00}, // U+00FC (u umlaut)
+ { 0x00, 0x38, 0x00, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+00FD (y aigu)
+ { 0x00, 0x00, 0x06, 0x3E, 0x66, 0x3E, 0x06, 0x00}, // U+00FE (thorn)
+ { 0x00, 0x33, 0x00, 0x33, 0x33, 0x3E, 0x30, 0x1F} // U+00FF (y umlaut)
+};
+
+#endif
\ No newline at end of file
diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h
index 13fdf23e4..e3f3256fc 100644
--- a/tasmota/tasmota_template.h
+++ b/tasmota/tasmota_template.h
@@ -524,7 +524,6 @@ const uint16_t kGpioNiceList[] PROGMEM = {
#ifdef USE_DISPLAY_MAX7219_MATRIX
#undef USE_DISPLAY_MAX7219
#undef USE_DISPLAY_TM1637
- #define USE_DISPLAY_MODES1TO5
AGPIO(GPIO_MAX7219CLK),
AGPIO(GPIO_MAX7219DIN),
AGPIO(GPIO_MAX7219CS),
diff --git a/tasmota/xdsp_19_max7219_matrix.ino b/tasmota/xdsp_19_max7219_matrix.ino
index ec82420e2..3ec3ac332 100644
--- a/tasmota/xdsp_19_max7219_matrix.ino
+++ b/tasmota/xdsp_19_max7219_matrix.ino
@@ -1,5 +1,5 @@
/*
- xdsp_19_max7219_matrix.ino.ino - Support for MAX7219 based dot matrix displays for Tasmota
+ xdsp_19_max7219_matrix.ino.ino - Support for MAX7219 based 8x8 dot matrix displays for Tasmota
Copyright (C) 2021 Michael Beuss
@@ -20,111 +20,63 @@
#ifdef USE_DISPLAY
#ifdef USE_DISPLAY_MAX7219_MATRIX
/*********************************************************************************************\
- This driver enables the display of ascii text on MAX7219 based LED dot matrix modules.
+ This driver enables the display of ascii text on MAX7219 based 8x8 LED dot matrix modules (1088AS).
- Connect the MAX7219 display module's pins to any free GPIOs of the ESP8266 or ESP32 module
- and assign the pins as follows from Tasmota's GUI:
+ Connect the MAX7219 display module's pins to any free GPIOs of the ESP8266 or ESP32 module.
+ VCC should be 5V. Depending on the number of used modules and the brightness, the used current can be more than 500 mA.
+
+ Connect the 5 outgoing pins (VCC, GND, DI, CS, CLK) of the first module to the next one.
+ With this you can connect up to 32 modules.
+ To extend the display hieght, multiple rows are supported. Each module row starts from left to right.
+
+ Assign the pins as follows from Tasmota's GUI:
DIN hardware pin --> "MAX7219 DIN"
CS hardware pin --> "MAX7219 CS"
CLK hardware pin --> "MAX7219 CLK"
+
Once the GPIO configuration is saved and the ESP8266/ESP32 module restarts,
set the Display Model to 19 and Display Mode to 0
- using the command "Backlog DisplayModel 15 ; DisplayMode 0"
- If your display is a TM1637 with 6 digits, set Display Width to the number of digits your
- display has, using the command "DisplayWidth 6".
+ Depending on order oth the wired 8x8 matrix modules you have got a display of size pixel_width x pixel_height.
+ The size has to be set with the commands "DisplayWidth " and "DisplayHeight "
After the ESP8266/ESP32 module restarts again, turn ON the display with the command "Power 1"
+
Now, the following "Display" commands can be used:
+ DisplayText text
+ Sends the text to the display.
+ If the text fits into the display, it is shown in the center.
+ Otherwise it scrolls to the left and repeats as long it is cleared or new "DisplayText" overwrites it.
+
+ DisplayDimmer [0..100]
+ Sets the intensity of the display.
+
+ Power [ON|OFF]
+ Sitches the display on or off. When "off", the display buffer is not cleared and will be shown again when after "Power ON".
+ Other display commands are still active when off.
DisplayClear
+ Clears the display
- Clears the display, command: "DisplayClear"
+ DisplayScrollDelay [0..15] // default = 0
+ Sets the speed of text scroll. Smaller delay = faster scrolling.
+ The maximum scroll speed is 50ms per pixel on DisplayScrollDelay 0.
+ DisplayWidth [8..256]
+ Sets the pixel width of the display (8x number of modules in a row)
- DisplayNumber num [,position {0-(Settings->display_width-1))} [,leading_zeros {0|1} [,length {1 to Settings->display_width}]]]
+ DisplayHeight [8..256]
+ Sets the pixel height of the display (8x number of module rows)
- Clears and then displays number without decimal. command e.g., "DisplayNumber 1234"
- Control 'leading zeros', 'length' and 'position' with "DisplayNumber 1234, , , "
- 'leading zeros' can be 1 or 0 (default), 'length' can be 1 to Settings->display_width, 'position' can be 0 (left-most) to Settings->display_width (right-most).
- See function description below for more details.
-
- DisplayNumberNC num [,position {0-(Settings->display_width-1))} [,leading_zeros {0|1} [,length {1 to Settings->display_width}]]]
-
- Display integer number as above, but without clearing first. e.g., "DisplayNumberNC 1234". Usage is same as above.
-
-
-
- DisplayFloat num [,position {0-(Settings->display_width-1)} [,precision {0-Settings->display_width} [,length {1 to Settings->display_width}]]]
-
- Clears and then displays float (with decimal point) command e.g., "DisplayFloat 12.34"
- See function description below for more details.
-
-
-
- DisplayFloatNC num [,position {0-(Settings->display_width-1)} [,precision {0-Settings->display_width} [,length {1 to Settings->display_width}]]]
-
- Displays float (with decimal point) as above, but without clearing first. command e.g., "DisplayFloatNC 12.34"
- See function description below for more details.
-
-
-
- DisplayRaw position {0-(Settings->display_width-1)},length {1 to Settings->display_width}, num1 [, num2[, num3[, num4[, ...upto Settings->display_width numbers]]]]]
-
- Takes upto Settings->display_width comma-separated integers (0-255) and displays raw segments. Each number represents a
- 7-segment digit. Each 8-bit number represents individual segments of a digit.
- For example, the command "DisplayRaw 0, 4, 255, 255, 255, 255" would display "[8.8.8.8.]"
-
-
-
- DisplayText text [, position {0-(Settings->display_width-1)} [,length {1 to Settings->display_width}]]
-
- Clears and then displays basic text. command e.g., "DisplayText ajith vasudevan"
- Control 'length' and 'position' with "DisplayText , , "
- 'length' can be 1 to Settings->display_width, 'position' can be 0 (left-most) to Settings->display_width-1 (right-most)
- A caret(^) symbol in the text input is dispayed as the degrees(°) symbol. This is useful for displaying Temperature!
- For example, the command "DisplayText 22.5^" will display "22.5°".
-
-
- DisplayTextNC text [, position {0-Settings->display_width-1} [,length {1 to Settings->display_width}]]
-
- Clears first, then displays text. Usage is same as above.
-
-
-
- DisplayScrollText text [, num_loops]
-
- Displays scrolling text indefinitely, until another Display- command (other than DisplayScrollText
- or DisplayScrollDelay is issued). Optionally, stop scrolling after num_loops iterations.
-
-
-
- DisplayScrollDelay delay {0-15} // default = 4
-
- Sets the speed of text scroll. Smaller delay = faster scrolling.
-
-
-
- DisplayLevel num {0-100}
-
- Display a horizontal bar graph (0-100) command e.g., "DisplayLevel 50" will display [|||| ]
-
-
-
- DisplayClock 1|2|0
-
- Displays a clock.
- Commands "DisplayClock 1" // 12 hr format
- "DisplayClock 2" // 24 hr format
- "DisplayClock 0" // turn off clock
-
-
-In addition, setting DisplayMode to 1 shows the time, setting it to 2 shows the date
-and setting it to 3 alternates between time and date.
+ DisplayClock [0|1|2]
+ Displays a clock.
+ Commands "DisplayClock 1" // 12 hr format
+ "DisplayClock 2" // 24 hr format
+ "DisplayClock 0" // turn off clock
@@ -132,20 +84,26 @@ and setting it to 3 alternates between time and date.
#define XDSP_19 19
-#include
#include
+#ifdef USE_DISPLAY_MODES1TO5
+#include
+#endif
+
LedMatrix *max7219_Matrix = nullptr;
bool max2791Matrix_initDriver_done = false;
struct
{
byte modulesPerRow = 4;
byte modulesPerCol = 1;
+ byte scroll_delay = 0;
+ byte scroll_iteration = 0;
bool show_clock = false;
- const char* timeFormat;
+ const char *timeFormat;
} LedMatrix_settings;
+// FUNC_DISPLAY_INIT_DRIVER
bool MAX7291Matrix_initDriver(void)
{
if (!PinUsed(GPIO_MAX7219DIN) || !PinUsed(GPIO_MAX7219CLK) || !PinUsed(GPIO_MAX7219CS))
@@ -174,6 +132,7 @@ bool MAX7291Matrix_initDriver(void)
return MAX7291Matrix_init();
}
+// FUNC_DISPLAY_INIT
bool MAX7291Matrix_init(void)
{
int intensity = GetDisplayDimmer16(); // 0..15
@@ -187,6 +146,39 @@ bool MAX7291Matrix_init(void)
return true;
}
+// FUNC_DISPLAY_SCROLLDELAY
+bool MAX7291Matrix_scrollDelay(void)
+{
+ if (ArgC() == 0)
+ {
+ XdrvMailbox.payload = LedMatrix_settings.scroll_delay;
+ return true;
+ }
+ if (LedMatrix_settings.scroll_delay < 0)
+ LedMatrix_settings.scroll_delay = 0;
+ LedMatrix_settings.scroll_delay = XdrvMailbox.payload;
+ return true;
+}
+
+// FUNC_DISPLAY_EVERY_50_MSECOND
+bool MAX7291Matrix_scrollText(void)
+{
+ // This function is called every 50 ms.
+ // scroll_delay defines the number of cycles to be ignored until the display scrolls by one pixel to the left.
+ // e.g. scrall_delay = 4 causes a scroll each 200 ms.
+ LedMatrix_settings.scroll_iteration++;
+ if (LedMatrix_settings.scroll_delay)
+ LedMatrix_settings.scroll_iteration = LedMatrix_settings.scroll_iteration % LedMatrix_settings.scroll_delay;
+ else
+ LedMatrix_settings.scroll_iteration = 0;
+ if (LedMatrix_settings.scroll_iteration)
+ return false;
+
+ return max7219_Matrix->scrollText();
+}
+
+#ifdef USE_DISPLAY_MODES1TO5
+// FUNC_DISPLAY_CLOCK
bool MAX7291Matrix_clock(void)
{
LedMatrix_settings.show_clock = XdrvMailbox.payload;
@@ -213,11 +205,11 @@ bool MAX7291Matrix_clock(void)
AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: LedMatrix_settings.show_clock %d, timeFormat %s"), LedMatrix_settings.show_clock, LedMatrix_settings.timeFormat);
- //max7219_Matrix->clearDisplay();
MAX7291Matrix_showTime();
return true;
}
+// FUNC_DISPLAY_EVERY_SECOND
bool MAX7291Matrix_showTime()
{
time_t rawtime;
@@ -227,11 +219,12 @@ bool MAX7291Matrix_showTime()
time(&rawtime);
timeinfo = localtime(&rawtime);
strftime(timeStr, 10, LedMatrix_settings.timeFormat, timeinfo);
- //AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: showTime:%s"), timeStr);
max7219_Matrix->drawText(timeStr);
return true;
}
+#endif // USE_DISPLAY_MODES1TO5
+
bool Xdsp19(uint8_t function)
{
@@ -260,30 +253,28 @@ bool Xdsp19(uint8_t function)
case FUNC_DISPLAY_DIM:
result = max7219_Matrix->setIntensity(GetDisplayDimmer16());
break;
- case FUNC_DISPLAY_CLOCK:
- result = MAX7291Matrix_clock();
- break;
- case FUNC_DISPLAY_SEVENSEG_TEXT:
- case FUNC_DISPLAY_SEVENSEG_TEXTNC:
- case FUNC_DISPLAY_NUMBER:
- case FUNC_DISPLAY_NUMBERNC:
- case FUNC_DISPLAY_FLOAT:
- case FUNC_DISPLAY_FLOATNC:
- case FUNC_DISPLAY_RAW:
- case FUNC_DISPLAY_LEVEL:
- case FUNC_DISPLAY_SCROLLTEXT:
case FUNC_DISPLAY_DRAW_STRING:
result = max7219_Matrix->drawText(dsp_str);
break;
+ case FUNC_DISPLAY_SCROLLDELAY:
+ result = MAX7291Matrix_scrollDelay();
+ break;
+ case FUNC_DISPLAY_EVERY_50_MSECOND:
+ result = MAX7291Matrix_scrollText();
+ break;
+
+#ifdef USE_DISPLAY_MODES1TO5
+ case FUNC_DISPLAY_CLOCK:
+ result = MAX7291Matrix_clock();
+ break;
case FUNC_DISPLAY_EVERY_SECOND:
if (LedMatrix_settings.show_clock)
{
result = MAX7291Matrix_showTime();
}
-
break;
- case FUNC_DISPLAY_EVERY_50_MSECOND:
- result = max7219_Matrix->scrollText();
+#endif // USE_DISPLAY_MODES1TO5
+
default:
result = false;
}
From 71f1c1775fc44f20d535c572ead9efe94f50eeda Mon Sep 17 00:00:00 2001
From: Alexey Pavlov
Date: Sun, 7 Nov 2021 17:56:28 +0300
Subject: [PATCH 009/402] fix opentherm
---
tasmota/xsns_69_opentherm.ino | 20 ++++++++++++++++--
tasmota/xsns_69_opentherm_protocol.ino | 29 ++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/tasmota/xsns_69_opentherm.ino b/tasmota/xsns_69_opentherm.ino
index cfcc0384d..c94e61b59 100644
--- a/tasmota/xsns_69_opentherm.ino
+++ b/tasmota/xsns_69_opentherm.ino
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#define USE_OPENTHERM
#ifdef USE_OPENTHERM
@@ -467,8 +468,11 @@ uint8_t sns_opentherm_read_flags(char *data, uint32_t len)
// flag value, however, this command does not update the settings.
#define D_CMND_SET_HOT_WATER_ENABLED "dhw"
+// BLOR - Reset boiler
+#define D_CMND_BLLOR "blor"
+
const char kOpenThermCommands[] PROGMEM = D_PRFX_OTHERM "|" D_CMND_OTHERM_BOILER_SETPOINT "|" D_CMND_OTHERM_DHW_SETPOINT
- "|" D_CMND_OTHERM_SAVE_SETTINGS "|" D_CMND_OTHERM_FLAGS "|" D_CMND_SET_CENTRAL_HEATING_ENABLED "|" D_CMND_SET_HOT_WATER_ENABLED;
+ "|" D_CMND_OTHERM_SAVE_SETTINGS "|" D_CMND_OTHERM_FLAGS "|" D_CMND_SET_CENTRAL_HEATING_ENABLED "|" D_CMND_SET_HOT_WATER_ENABLED "|" D_CMND_BLLOR;
void (*const OpenThermCommands[])(void) PROGMEM = {
&sns_opentherm_boiler_setpoint_cmd,
@@ -476,7 +480,8 @@ void (*const OpenThermCommands[])(void) PROGMEM = {
&sns_opentherm_save_settings_cmd,
&sns_opentherm_flags_cmd,
&sns_opentherm_set_central_heating_cmd,
- &sns_opentherm_set_hot_water_cmd};
+ &sns_opentherm_set_hot_water_cmd,
+ &sns_opentherm_blor_cmd,};
void sns_opentherm_cmd(void) { }
void sns_opentherm_boiler_setpoint_cmd(void)
@@ -550,6 +555,17 @@ void sns_opentherm_set_hot_water_cmd(void)
ResponseCmndNumber(sns_ot_boiler_status.m_enableHotWater ? 1 : 0);
}
+void sns_opentherm_blor_cmd(void)
+{
+ bool query = strlen(XdrvMailbox.data) == 0;
+ bool retval = false;
+ if (!query)
+ {
+ if (atoi(XdrvMailbox.data)) retval = sns_opentherm_call_blor();
+ }
+ ResponseCmndNumber(retval);
+}
+
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
diff --git a/tasmota/xsns_69_opentherm_protocol.ino b/tasmota/xsns_69_opentherm_protocol.ino
index bc821640a..a86648849 100644
--- a/tasmota/xsns_69_opentherm_protocol.ino
+++ b/tasmota/xsns_69_opentherm_protocol.ino
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+#define USE_OPENTHERM
#ifdef USE_OPENTHERM
@@ -243,6 +244,14 @@ OpenThermCommand sns_opentherm_commands[] = {
.m_ot_make_request = sns_opentherm_get_generic_u16,
.m_ot_parse_response = sns_opentherm_parse_generic_u16,
.m_ot_appent_telemetry = sns_opentherm_tele_generic_u16},
+ {// Boiler Lock-out Reset command
+ .m_command_name = "BLOR",
+ .m_command_code = (uint8_t)OpenThermMessageID::Command,
+ .m_flags = {.notSupported = 1},
+ .m_results = {{.m_u8 = 0}, {.m_u8 = 0}},
+ .m_ot_make_request = sns_opentherm_send_blor,
+ .m_ot_parse_response = sns_opentherm_parse_generic_u16,
+ .m_ot_appent_telemetry = sns_opentherm_tele_u8_u8},
};
/////////////////////////////////// Process Slave Status Flags & Control //////////////////////////////////////////////////
@@ -431,6 +440,26 @@ void sns_opentherm_tele_oem_diag(struct OpenThermCommandT *self)
ResponseAppend_P(PSTR("%d"), (int)self->m_results[0].m_u16);
}
+/////////////////////////////////// Boiler Boiler Lock-out Reset //////////////////////////////////////////////////
+unsigned long sns_opentherm_send_blor(struct OpenThermCommandT *self, struct OT_BOILER_STATUS_T *status)
+{
+ AddLog(LOG_LEVEL_ERROR, PSTR("[OTH]: Boiler Boiler Lock-out Reset"));
+
+ self->m_flags.notSupported = true; // Disable future calls of this command
+
+ unsigned int data = 1; //1 : “BLOR”= Boiler Lock-out Reset command
+ return OpenTherm::buildRequest(OpenThermMessageType::WRITE_DATA, OpenThermMessageID::Command, data);
+}
+bool sns_opentherm_call_blor()
+{
+ /*
+ OpenThermCommandT *cmd = &sns_opentherm_commands[sns_opentherm_current_command-1];
+ if (strcmp(cmd->m_command_name, "BLOR")) return false;
+ cmd->m_flags.notSupported = false;
+ return true;
+ */
+}
+
/////////////////////////////////// Generic Single Float /////////////////////////////////////////////////
unsigned long sns_opentherm_get_generic_float(struct OpenThermCommandT *self, struct OT_BOILER_STATUS_T *)
{
From af14b4943525264c27ea0e4eada391b83352c4bb Mon Sep 17 00:00:00 2001
From: Alexey Pavlov
Date: Sun, 28 Nov 2021 18:44:10 +0300
Subject: [PATCH 010/402] merge conflict
---
tasmota/xlgt_01_ws2812.ino | 99 +++++++++++++++++++++++++++++++++++++-
1 file changed, 98 insertions(+), 1 deletion(-)
diff --git a/tasmota/xlgt_01_ws2812.ino b/tasmota/xlgt_01_ws2812.ino
index 3a9e396f3..f2c8b0610 100644
--- a/tasmota/xlgt_01_ws2812.ino
+++ b/tasmota/xlgt_01_ws2812.ino
@@ -17,6 +17,11 @@
along with this program. If not, see .
*/
+#ifndef FIRMWARE_MINIMAL
+#define USE_LIGHT
+#define USE_WS2812
+#endif
+
#ifdef USE_LIGHT
#ifdef USE_WS2812
/*********************************************************************************************\
@@ -37,7 +42,7 @@
#define XLGT_01 1
-const uint8_t WS2812_SCHEMES = 9; // Number of WS2812 schemes
+const uint8_t WS2812_SCHEMES = 10; // Number of WS2812 schemes
const char kWs2812Commands[] PROGMEM = "|" // No prefix
D_CMND_LED "|" D_CMND_PIXELS "|" D_CMND_ROTATION "|" D_CMND_WIDTH "|" D_CMND_STEPPIXELS ;
@@ -291,6 +296,93 @@ void Ws2812Clock(void)
Ws2812StripShow();
}
+#define pow2(x) ((x)*(x))
+#define pow3(x) ((x)*pow2(x))
+#define pow4(x) (pow2(x)*pow2(x))
+
+void Ws2812RunningStrip(int scheme)
+{
+#if (USE_WS2812_CTYPE > NEO_3LED)
+ RgbwColor c;
+ c.W = 0;
+#else
+ RgbColor c(Settings->light_dimmer);
+#endif
+
+ static uint32_t timer_counter = 0;
+ static uint32_t last_timer_counter = timer_counter;
+ if (Settings->light_rotation%2) timer_counter--;
+ else timer_counter++;
+
+ uint32_t width = Settings->ws_width[WS_MINUTE]?Settings->ws_width[WS_MINUTE]:1;
+ uint32_t repeat = 1;//kWsRepeat[Settings->light_width]; // number of scheme.count per ledcount
+ uint32_t range = (uint32_t)ceil((float)Settings->light_pixels / (float)repeat);
+ uint32_t speed = Settings->light_speed; //((Settings->light_speed * 2) -1) * (STATES / 10); //
+ static uint32_t offset = 0;
+
+ if (scheme==WS2812_SCHEMES-1) {
+ if (timer_counter/speed!=last_timer_counter/speed) {
+ offset = random(range);
+ last_timer_counter = timer_counter;
+ }
+ } else {
+ offset = speed > 0 ? timer_counter / speed : 0;
+ }
+
+ //WsColor oldColor, currentColor;
+ //Ws2812GradientColor(schemenr, &oldColor, range, gradRange, offset);
+ //currentColor = oldColor;
+ int power = Settings->ws_width[WS_SECOND];
+ int max_input = pow(width, power);
+ float dimmer = 100 / (float)Settings->light_dimmer;
+
+ uint32_t target = offset % Settings->light_pixels;
+
+ for (uint32_t i = 0; i < Settings->light_pixels; i++) {
+ int delta = targetlight_color[0] / pow(delta+1, power);
+ float fmyGrn = Settings->light_color[1] / pow(delta+1, power);
+ float fmyBlu = Settings->light_color[2] / pow(delta+1, power);
+ /*
+ float fmyRed = (float)wsmap(max_input-pow(delta+1, power), 0, max_input, 0, Settings->light_color[0]);
+ float fmyGrn = (float)wsmap(max_input-pow(delta+1, power), 0, max_input, 0, Settings->light_color[1]);
+ float fmyBlu = (float)wsmap(max_input-pow(delta+1, power), 0, max_input, 0, Settings->light_color[2]);
+ */
+
+ c.R = (uint8_t)fmyRed/dimmer;
+ c.G = (uint8_t)fmyGrn/dimmer;
+ c.B = (uint8_t)fmyBlu/dimmer;
+ }
+ else {
+ c.R = 0 ;
+ c.G = 0 ;
+ c.B = 0 ;
+ }
+
+ if (Settings->light_width==2) {
+ c.R = Settings->light_color[0]/dimmer - c.R;
+ c.G = Settings->light_color[1]/dimmer - c.G;
+ c.B = Settings->light_color[2]/dimmer - c.B;
+ } else if (Settings->ws_width[WS_MINUTE]==3) {
+ c.R = max(100 - c.R,0);
+ c.G = max(100 - c.G,0);
+ c.B = max(100 - c.B,0);
+ }
+
+ strip->SetPixelColor(i, c);
+/*
+ // Blend old and current color based on time for smooth movement.
+ c.R = wsmap(Light.strip_timer_counter % speed, 0, speed, oldColor.red, currentColor.red);
+ c.G = wsmap(Light.strip_timer_counter % speed, 0, speed, oldColor.green, currentColor.green);
+ c.B = wsmap(Light.strip_timer_counter % speed, 0, speed, oldColor.blue, currentColor.blue);
+ strip->SetPixelColor(i, c);
+ oldColor = currentColor;
+ */
+ }
+ Ws2812StripShow();
+}
+
void Ws2812GradientColor(uint32_t schemenr, struct WsColor* mColor, uint32_t range, uint32_t gradRange, uint32_t i)
{
/*
@@ -588,6 +680,11 @@ void Ws2812ShowScheme(void)
Ws2812.show_next = 0;
}
break;
+ case WS2812_SCHEMES-2: // Running strip
+ case WS2812_SCHEMES-1: // Running strip
+ Ws2812RunningStrip(scheme);
+ Ws2812.show_next = 1;
+ break;
default:
if(Settings->light_step_pixels > 0){
Ws2812Steps(scheme -1);
From 5b3266e7ca90dfdbe750a6be746b14f6de24f884 Mon Sep 17 00:00:00 2001
From: Michael
Date: Mon, 29 Nov 2021 15:27:55 +0100
Subject: [PATCH 011/402] Support for more than 8 matrix devices
---
lib/lib_display/LedControl/src/LedControl.cpp | 37 ++-
lib/lib_display/LedControl/src/LedControl.h | 20 +-
lib/lib_display/LedControl/src/LedMatrix.cpp | 24 +-
lib/lib_display/LedControl/src/LedMatrix.h | 13 +-
.../LedControl/src/font_5x8_horizontal_MSB.h | 267 ------------------
.../src/font_8x8_horizontal_latin_MSB.h | 265 -----------------
tasmota/xdsp_19_max7219_matrix.ino | 89 ++++--
7 files changed, 129 insertions(+), 586 deletions(-)
delete mode 100644 lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
delete mode 100644 lib/lib_display/LedControl/src/font_8x8_horizontal_latin_MSB.h
diff --git a/lib/lib_display/LedControl/src/LedControl.cpp b/lib/lib_display/LedControl/src/LedControl.cpp
index e43211fd8..11e7a2908 100644
--- a/lib/lib_display/LedControl/src/LedControl.cpp
+++ b/lib/lib_display/LedControl/src/LedControl.cpp
@@ -47,16 +47,16 @@ LedControl::LedControl(int dataPin, int clkPin, int csPin, int numDevices) {
SPI_MOSI=dataPin;
SPI_CLK=clkPin;
SPI_CS=csPin;
- if(numDevices<=0 || numDevices>8 )
- numDevices=8;
- maxDevices=numDevices;
+ if (numDevices <= 0 || numDevices > MAX72XX_MAX_DEVICES)
+ numDevices = MAX72XX_MAX_DEVICES;
+ maxDevices = numDevices;
pinMode(SPI_MOSI,OUTPUT);
pinMode(SPI_CLK,OUTPUT);
pinMode(SPI_CS,OUTPUT);
digitalWrite(SPI_CS,HIGH);
SPI_MOSI=dataPin;
- for(int i=0;i<64;i++)
- status[i]=0x00;
+ for (int i = 0; i < 8 * MAX72XX_MAX_DEVICES; i++)
+ status[i] = 0x00;
for(int i=0;i 7)
+ return;
+ for (int addr = 0; addr < maxDevices; addr++)
+ status[addr * 8 + row] = value[addr];
+ spiTransferLong(row + 1, value);
+}
+
void LedControl::setColumn(int addr, int col, byte value) {
byte val;
@@ -195,7 +204,7 @@ void LedControl::spiTransfer(int addr, volatile byte opcode, volatile byte data)
int maxbytes=maxDevices*2;
for(int i=0;i 0; i--)
+ shiftOut(SPI_MOSI, SPI_CLK, MSBFIRST, spidata[i - 1]);
+ //latch the data onto the display
+ digitalWrite(SPI_CS, HIGH);
+}
diff --git a/lib/lib_display/LedControl/src/LedControl.h b/lib/lib_display/LedControl/src/LedControl.h
index f8180d07d..31fed9ffe 100644
--- a/lib/lib_display/LedControl/src/LedControl.h
+++ b/lib/lib_display/LedControl/src/LedControl.h
@@ -35,6 +35,10 @@
#include
#endif
+#ifndef MAX72XX_MAX_DEVICES
+#define MAX72XX_MAX_DEVICES 32 // maximum number of devices based on MXA7219/MAX7221
+#endif
+
/*
* Segments to be switched on for characters and digits on
* 7-Segment Displays
@@ -61,12 +65,14 @@ const static byte charTable [] PROGMEM = {
class LedControl {
private :
/* The array for shifting the data to the devices */
- byte spidata[16];
- /* Send out a single command to the device */
+ byte spidata[2 * MAX72XX_MAX_DEVICES];
+ /* Send out a single command to one device */
void spiTransfer(int addr, byte opcode, byte data);
+ /* Send out a command with the same opcode to all devices */
+ void spiTransferLong(byte opcode, const byte* data);
/* We keep track of the led-status for all 8 devices in this array */
- byte status[64];
+ byte status[8 * MAX72XX_MAX_DEVICES];
/* Data is shifted out of this pin*/
int SPI_MOSI;
/* The clock is signaled on this pin */
@@ -149,6 +155,14 @@ class LedControl {
*/
void setRow(int addr, int row, byte value);
+ /**
+ * @brief Set data for the same row of all devices
+ *
+ * @param row [0..8]
+ * @param value array of bytes, one for each device
+ */
+ void setRowLong(int row, byte* value);
+
/*
* Set all 8 Led's in a column to a new state
* Params:
diff --git a/lib/lib_display/LedControl/src/LedMatrix.cpp b/lib/lib_display/LedControl/src/LedMatrix.cpp
index b4fb8c260..1579e0852 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.cpp
+++ b/lib/lib_display/LedControl/src/LedMatrix.cpp
@@ -32,17 +32,17 @@
// public
LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows)
{
- if (colums * rows > MATRIX_MAX_MODULES)
+ if (colums * rows > MAX72XX_MAX_DEVICES)
{
// dimension exeeds maximum buffer size
- if (colums >= MATRIX_MAX_MODULES)
+ if (colums >= MAX72XX_MAX_DEVICES)
{
- colums = MATRIX_MAX_MODULES;
+ colums = MAX72XX_MAX_DEVICES;
rows = 1;
}
else
{
- rows = MATRIX_MAX_MODULES / colums;
+ rows = MAX72XX_MAX_DEVICES / colums;
}
}
@@ -66,7 +66,7 @@ LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, un
setIntensity(7);
}
-bool LedMatrix::drawText( const char *str)
+bool LedMatrix::drawText( const char *str, bool clearBefore)
{
strncpy(textBuf, str, TEXT_BUFFER_SIZE -1);
textPosX = 0;
@@ -75,7 +75,7 @@ bool LedMatrix::drawText( const char *str)
if(textWidth < displayWidth)
{
// text fits into the display, place it into the center
- clear();
+ if(clearBefore) clear();
textPosX = (displayWidth - textWidth) / 2; // center
}
else
@@ -146,9 +146,13 @@ bool LedMatrix::setIntensity(byte dim)
return true;
}
-bool LedMatrix::setOrientation(ModuleOrientation orientation)
+bool LedMatrix::setOrientation(LedMatrix::ModuleOrientation orientation)
{
- moduleOrientation = orientation;
+ if(moduleOrientation != orientation)
+ {
+ moduleOrientation = orientation;
+ refresh();
+ }
return true;
}
@@ -268,9 +272,9 @@ void LedMatrix::refreshByteOfBuffer(int i)
byte LedMatrix::revereBitorder (byte b)
{
- const static byte lookup[] PROGMEM = {
+ static const byte lookup[16] = {
0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe,
- 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf,
+ 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf
};
return (lookup[b & 0b1111] << 4) | lookup[b >> 4];
}
diff --git a/lib/lib_display/LedControl/src/LedMatrix.h b/lib/lib_display/LedControl/src/LedMatrix.h
index efb50b8e3..b369173d0 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.h
+++ b/lib/lib_display/LedControl/src/LedMatrix.h
@@ -29,8 +29,7 @@
#include
-#define MATRIX_MAX_MODULES 32 // maximum number of modules that can be used
-#define MATRIX_BUFFER_SIZE MATRIX_MAX_MODULES * 8 // 8 bytes per modul. One byte represents 8 LEDs.
+#define MATRIX_BUFFER_SIZE MAX72XX_MAX_DEVICES * 8 // 8 bytes per modul. One byte represents 8 LEDs.
#define TEXT_BUFFER_SIZE 256 // maximum text length that can be scrolled
#define TEXT_APPEND_BUFFER_SIZE 16 // used for characters that are appended to the scroll text, before it repeats
@@ -66,12 +65,14 @@ class LedMatrix
* When the text is longer than than the display width, it can be scrolled per pixel with function scrollText().
*
* @param str string to display
+ * @param clearBefore true (default) clears old display content before, false: do not clear display before
*/
- bool drawText( const char *str );
+ bool drawText( const char *str, bool clearBefore = true );
/**
* @brief Dwaws a character string to a defined display position. The position (x,y) is used for the upper left pixel of the text.
- * Existing text before the x position will not be cleared. Use refresh() after all text parts are drawed.
+ * Existing content outside the drawing text area will not be cleared. But you can use clearDisplay() before.
+ * Use refresh() after all text parts are drawed.
*
* @param str string to display
* @param x horizantal pixel position to start with string (0 is most left)
@@ -112,7 +113,7 @@ class LedMatrix
*
* @param orientation
*/
- bool setOrientation(ModuleOrientation orientation);
+ bool setOrientation(LedMatrix::ModuleOrientation orientation);
/**
* @brief Set ap pixel at a defined position.
@@ -151,7 +152,7 @@ class LedMatrix
unsigned int displayWidth; // matrix width [pixel]
unsigned int displayHeight; // matrix height [pixel]
unsigned int modules; // number of 8x8 mudules
- ModuleOrientation moduleOrientation;
+ uint8_t moduleOrientation;
byte buffer[MATRIX_BUFFER_SIZE];
LedControl* ledControl;
int charWidth;
diff --git a/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h b/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
deleted file mode 100644
index da3becc4e..000000000
--- a/lib/lib_display/LedControl/src/font_5x8_horizontal_MSB.h
+++ /dev/null
@@ -1,267 +0,0 @@
-// 5x8 ascii font
-#ifndef font_5x8_horizontal_MSB_h
-#define font_5x8_horizontal_MSB_h
-
-const unsigned int font_char_width = 5;
-const unsigned int font_char_height = 8;
-
-const char font[256][8]={
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
-{0x0E,0x11,0x1B,0x11,0x1F,0x0E,0x00,0x00}, // 0x01
-{0x0E,0x15,0x1F,0x11,0x1F,0x0E,0x00,0x00}, // 0x02
-{0x0A,0x1F,0x1F,0x1F,0x0E,0x04,0x00,0x00}, // 0x03
-{0x04,0x04,0x0E,0x1F,0x0E,0x04,0x04,0x00}, // 0x04
-{0x04,0x0E,0x04,0x1F,0x15,0x04,0x0E,0x00}, // 0x05
-{0x04,0x0E,0x1F,0x1F,0x15,0x04,0x0E,0x00}, // 0x06
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
-{0x03,0x03,0x0E,0x11,0x11,0x11,0x0E,0x00}, // 0x0B
-{0x0E,0x11,0x11,0x11,0x0E,0x04,0x0E,0x04}, // 0x0C
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
-{0x03,0x0F,0x09,0x09,0x0B,0x1B,0x18,0x00}, // 0x0E
-{0x00,0x15,0x0E,0x1B,0x0E,0x15,0x00,0x00}, // 0x0F
-{0x00,0x10,0x1C,0x1F,0x1C,0x10,0x00,0x00}, // 0x10
-{0x00,0x01,0x07,0x1F,0x07,0x01,0x00,0x00}, // 0x11
-{0x04,0x0E,0x04,0x04,0x04,0x0E,0x04,0x00}, // 0x12
-{0x00,0x0A,0x0A,0x0A,0x00,0x0A,0x00,0x00}, // 0x13
-{0x0E,0x1A,0x1A,0x0A,0x0A,0x0A,0x0A,0x00}, // 0x14
-{0x06,0x08,0x04,0x0A,0x04,0x02,0x0C,0x00}, // 0x15
-{0x00,0x00,0x00,0x0F,0x0F,0x00,0x00,0x00}, // 0x16
-{0x04,0x0E,0x04,0x0E,0x04,0x00,0x0E,0x00}, // 0x17
-{0x04,0x0E,0x04,0x04,0x04,0x04,0x04,0x00}, // 0x18
-{0x04,0x04,0x04,0x04,0x04,0x0E,0x04,0x00}, // 0x19
-{0x00,0x00,0x02,0x0F,0x02,0x00,0x00,0x00}, // 0x1A
-{0x00,0x00,0x04,0x0F,0x04,0x00,0x00,0x00}, // 0x1B
-{0x00,0x00,0x08,0x08,0x08,0x0F,0x00,0x00}, // 0x1C
-{0x00,0x00,0x0A,0x1F,0x0A,0x00,0x00,0x00}, // 0x1D
-{0x00,0x04,0x04,0x0E,0x0E,0x1F,0x00,0x00}, // 0x1E
-{0x00,0x1F,0x0E,0x0E,0x04,0x04,0x00,0x00}, // 0x1F
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x20
-{0x04,0x04,0x04,0x04,0x00,0x04,0x00,0x00}, // 0x21
-{0x0A,0x0A,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x22
-{0x00,0x05,0x1F,0x0A,0x1F,0x14,0x00,0x00}, // 0x23
-{0x04,0x0E,0x0C,0x04,0x06,0x0E,0x04,0x00}, // 0x24
-{0x09,0x15,0x0E,0x0E,0x15,0x12,0x00,0x00}, // 0x25
-{0x04,0x0A,0x0C,0x15,0x12,0x0D,0x00,0x00}, // 0x26
-{0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x27
-{0x03,0x04,0x08,0x08,0x08,0x04,0x03,0x00}, // 0x28
-{0x18,0x04,0x02,0x02,0x02,0x04,0x18,0x00}, // 0x29
-{0x04,0x0A,0x04,0x0A,0x00,0x00,0x00,0x00}, // 0x2A
-{0x00,0x00,0x00,0x04,0x0E,0x04,0x00,0x00}, // 0x2B
-{0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x08}, // 0x2C
-{0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00}, // 0x2D
-{0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00}, // 0x2E
-{0x01,0x02,0x02,0x04,0x04,0x08,0x08,0x00}, // 0x2F
-{0x06,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0x30
-{0x04,0x0C,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0x31
-{0x0C,0x02,0x02,0x04,0x08,0x0E,0x00,0x00}, // 0x32
-{0x0C,0x02,0x0C,0x02,0x02,0x0C,0x00,0x00}, // 0x33
-{0x02,0x06,0x0A,0x0F,0x02,0x02,0x00,0x00}, // 0x34
-{0x0E,0x08,0x0C,0x02,0x02,0x0C,0x00,0x00}, // 0x35
-{0x06,0x08,0x0E,0x09,0x09,0x06,0x00,0x00}, // 0x36
-{0x0F,0x01,0x02,0x04,0x04,0x04,0x00,0x00}, // 0x37
-{0x06,0x09,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x38
-{0x06,0x09,0x09,0x07,0x01,0x06,0x00,0x00}, // 0x39
-{0x00,0x00,0x04,0x00,0x00,0x04,0x00,0x00}, // 0x3A
-{0x00,0x00,0x04,0x00,0x00,0x04,0x04,0x08}, // 0x3B
-{0x00,0x01,0x02,0x0C,0x02,0x01,0x00,0x00}, // 0x3C
-{0x00,0x00,0x0F,0x00,0x0F,0x00,0x00,0x00}, // 0x3D
-{0x00,0x08,0x04,0x03,0x04,0x08,0x00,0x00}, // 0x3E
-{0x0E,0x01,0x02,0x04,0x00,0x04,0x00,0x00}, // 0x3F
-{0x06,0x09,0x13,0x15,0x17,0x10,0x0F,0x00}, // 0x40
-{0x00,0x04,0x0A,0x0A,0x1F,0x11,0x00,0x00}, // 0x41
-{0x00,0x0E,0x0A,0x0C,0x0A,0x0E,0x00,0x00}, // 0x42
-{0x00,0x07,0x08,0x08,0x08,0x07,0x00,0x00}, // 0x43
-{0x00,0x0E,0x09,0x09,0x09,0x0E,0x00,0x00}, // 0x44
-{0x00,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0x45
-{0x00,0x0E,0x08,0x0E,0x08,0x08,0x00,0x00}, // 0x46
-{0x00,0x07,0x08,0x0B,0x09,0x07,0x00,0x00}, // 0x47
-{0x00,0x09,0x09,0x0F,0x09,0x09,0x00,0x00}, // 0x48
-{0x00,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0x49
-{0x00,0x0E,0x02,0x02,0x02,0x0C,0x00,0x00}, // 0x4A
-{0x00,0x09,0x0A,0x0C,0x0A,0x09,0x00,0x00}, // 0x4B
-{0x00,0x08,0x08,0x08,0x08,0x0F,0x00,0x00}, // 0x4C
-{0x00,0x11,0x1B,0x15,0x15,0x11,0x00,0x00}, // 0x4D
-{0x00,0x09,0x0D,0x0B,0x09,0x09,0x00,0x00}, // 0x4E
-{0x00,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0x4F
-{0x00,0x0E,0x09,0x0E,0x08,0x08,0x00,0x00}, // 0x50
-{0x00,0x0E,0x11,0x11,0x11,0x0E,0x02,0x01}, // 0x51
-{0x00,0x0C,0x0A,0x0C,0x0A,0x09,0x00,0x00}, // 0x52
-{0x00,0x06,0x08,0x04,0x02,0x0C,0x00,0x00}, // 0x53
-{0x00,0x1F,0x04,0x04,0x04,0x04,0x00,0x00}, // 0x54
-{0x00,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0x55
-{0x00,0x09,0x09,0x09,0x06,0x06,0x00,0x00}, // 0x56
-{0x00,0x11,0x15,0x15,0x0A,0x0A,0x00,0x00}, // 0x57
-{0x00,0x11,0x0A,0x04,0x0A,0x11,0x00,0x00}, // 0x58
-{0x00,0x11,0x0A,0x04,0x04,0x04,0x00,0x00}, // 0x59
-{0x00,0x0F,0x01,0x06,0x08,0x0F,0x00,0x00}, // 0x5A
-{0x06,0x04,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x5B
-{0x10,0x08,0x08,0x04,0x04,0x02,0x02,0x00}, // 0x5C
-{0x0C,0x04,0x04,0x04,0x04,0x04,0x0C,0x00}, // 0x5D
-{0x04,0x0A,0x0A,0x11,0x11,0x00,0x00,0x00}, // 0x5E
-{0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00}, // 0x5F
-{0x08,0x04,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x60
-{0x00,0x00,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x61
-{0x08,0x08,0x0E,0x09,0x09,0x0E,0x00,0x00}, // 0x62
-{0x00,0x00,0x06,0x08,0x08,0x06,0x00,0x00}, // 0x63
-{0x02,0x02,0x0E,0x12,0x12,0x0E,0x00,0x00}, // 0x64
-{0x00,0x00,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x65
-{0x03,0x04,0x0F,0x04,0x04,0x04,0x00,0x00}, // 0x66
-{0x00,0x00,0x07,0x09,0x0F,0x01,0x0E,0x00}, // 0x67
-{0x08,0x08,0x0A,0x0D,0x09,0x09,0x00,0x00}, // 0x68
-{0x04,0x00,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0x69
-{0x02,0x00,0x0E,0x02,0x02,0x02,0x0C,0x00}, // 0x6A
-{0x08,0x08,0x0A,0x0C,0x0A,0x09,0x00,0x00}, // 0x6B
-{0x0C,0x04,0x04,0x04,0x04,0x04,0x00,0x00}, // 0x6C
-{0x00,0x00,0x15,0x1F,0x15,0x15,0x00,0x00}, // 0x6D
-{0x00,0x00,0x0A,0x0D,0x09,0x09,0x00,0x00}, // 0x6E
-{0x00,0x00,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x6F
-{0x00,0x00,0x0E,0x09,0x09,0x0E,0x08,0x00}, // 0x70
-{0x00,0x00,0x0E,0x12,0x12,0x0E,0x02,0x00}, // 0x71
-{0x00,0x00,0x0A,0x0C,0x08,0x08,0x00,0x00}, // 0x72
-{0x00,0x00,0x06,0x0C,0x02,0x0C,0x00,0x00}, // 0x73
-{0x00,0x04,0x0F,0x04,0x04,0x02,0x00,0x00}, // 0x74
-{0x00,0x00,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0x75
-{0x00,0x00,0x09,0x09,0x06,0x06,0x00,0x00}, // 0x76
-{0x00,0x00,0x15,0x15,0x0E,0x0A,0x00,0x00}, // 0x77
-{0x00,0x00,0x09,0x06,0x06,0x09,0x00,0x00}, // 0x78
-{0x00,0x00,0x09,0x09,0x06,0x06,0x1C,0x00}, // 0x79
-{0x00,0x00,0x0E,0x06,0x08,0x0E,0x00,0x00}, // 0x7A
-{0x02,0x04,0x04,0x08,0x04,0x04,0x02,0x00}, // 0x7B
-{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00}, // 0x7C
-{0x08,0x04,0x04,0x02,0x04,0x04,0x08,0x00}, // 0x7D
-{0x00,0x00,0x00,0x0D,0x12,0x00,0x00,0x00}, // 0x7E
-{0x00,0x04,0x0A,0x0A,0x0A,0x0E,0x00,0x00}, // 0x7F
-{0x00,0x07,0x08,0x08,0x08,0x07,0x02,0x04}, // 0x80
-{0x09,0x00,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0x81
-{0x01,0x02,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x82
-{0x06,0x09,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x83
-{0x0A,0x00,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x84
-{0x10,0x08,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x85
-{0x04,0x0A,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0x86
-{0x00,0x00,0x06,0x08,0x08,0x06,0x02,0x04}, // 0x87
-{0x06,0x09,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x88
-{0x0A,0x00,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x89
-{0x10,0x08,0x04,0x0E,0x08,0x06,0x00,0x00}, // 0x8A
-{0x0A,0x00,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0x8B
-{0x06,0x09,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0x8C
-{0x10,0x08,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0x8D
-{0x0A,0x04,0x0A,0x0A,0x1F,0x11,0x00,0x00}, // 0x8E
-{0x04,0x0A,0x04,0x0A,0x1F,0x11,0x00,0x00}, // 0x8F
-{0x01,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0x90
-{0x00,0x00,0x1A,0x07,0x1C,0x13,0x00,0x00}, // 0x91
-{0x00,0x07,0x0A,0x0B,0x1E,0x13,0x00,0x00}, // 0x92
-{0x0C,0x12,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x93
-{0x09,0x00,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x94
-{0x10,0x08,0x06,0x09,0x09,0x06,0x00,0x00}, // 0x95
-{0x0C,0x12,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0x96
-{0x08,0x04,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0x97
-{0x09,0x00,0x09,0x09,0x06,0x06,0x1C,0x00}, // 0x98
-{0x11,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0x99
-{0x12,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0x9A
-{0x00,0x01,0x06,0x0B,0x0D,0x06,0x08,0x00}, // 0x9B
-{0x00,0x04,0x08,0x0C,0x18,0x0E,0x00,0x00}, // 0x9C
-{0x01,0x0E,0x13,0x15,0x19,0x0E,0x10,0x00}, // 0x9D
-{0x00,0x00,0x09,0x06,0x06,0x09,0x00,0x00}, // 0x9E
-{0x02,0x04,0x04,0x0E,0x04,0x04,0x08,0x00}, // 0x9F
-{0x01,0x02,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0xA0
-{0x01,0x02,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0xA1
-{0x01,0x02,0x06,0x09,0x09,0x06,0x00,0x00}, // 0xA2
-{0x01,0x02,0x09,0x09,0x0B,0x05,0x00,0x00}, // 0xA3
-{0x0F,0x00,0x0A,0x0D,0x09,0x09,0x00,0x00}, // 0xA4
-{0x1F,0x09,0x0D,0x0B,0x09,0x09,0x00,0x00}, // 0xA5
-{0x0C,0x02,0x0E,0x0A,0x0E,0x00,0x00,0x00}, // 0xA6
-{0x04,0x0A,0x0A,0x0A,0x04,0x00,0x00,0x00}, // 0xA7
-{0x00,0x04,0x00,0x04,0x04,0x02,0x0C,0x00}, // 0xA8
-{0x0E,0x17,0x17,0x15,0x17,0x0E,0x00,0x00}, // 0xA9
-{0x00,0x00,0x00,0x0E,0x02,0x02,0x00,0x00}, // 0xAA
-{0x19,0x0A,0x0F,0x05,0x0A,0x13,0x00,0x00}, // 0xAB
-{0x19,0x0A,0x0A,0x05,0x0B,0x11,0x00,0x00}, // 0xAC
-{0x00,0x00,0x04,0x00,0x04,0x04,0x04,0x00}, // 0xAD
-{0x00,0x05,0x0A,0x14,0x0A,0x05,0x00,0x00}, // 0xAE
-{0x00,0x14,0x0A,0x05,0x0A,0x14,0x00,0x00}, // 0xAF
-{0x15,0x00,0x15,0x00,0x15,0x00,0x15,0x00}, // 0xB0
-{0x15,0x0A,0x15,0x0A,0x15,0x0A,0x15,0x0A}, // 0xB1
-{0x1F,0x15,0x1F,0x15,0x1F,0x15,0x1F,0x15}, // 0xB2
-{0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04}, // 0xB3
-{0x04,0x04,0x04,0x1C,0x04,0x04,0x04,0x04}, // 0xB4
-{0x02,0x04,0x0A,0x0A,0x1F,0x11,0x00,0x00}, // 0xB5
-{0x06,0x09,0x04,0x0A,0x1F,0x11,0x00,0x00}, // 0xB6
-{0x08,0x04,0x0A,0x0A,0x1F,0x11,0x00,0x00}, // 0xB7
-{0x0E,0x11,0x17,0x15,0x17,0x11,0x0E,0x00}, // 0xB8
-{0x0A,0x0A,0x1A,0x02,0x1A,0x0A,0x0A,0x0A}, // 0xB9
-{0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A}, // 0xBA
-{0x00,0x00,0x1E,0x02,0x1A,0x0A,0x0A,0x0A}, // 0xBB
-{0x0A,0x0A,0x1A,0x02,0x1E,0x00,0x00,0x00}, // 0xBC
-{0x00,0x04,0x0E,0x08,0x0E,0x04,0x00,0x00}, // 0xBD
-{0x00,0x11,0x0A,0x04,0x0E,0x04,0x00,0x00}, // 0xBE
-{0x00,0x00,0x00,0x1C,0x04,0x04,0x04,0x04}, // 0xBF
-{0x04,0x04,0x04,0x07,0x00,0x00,0x00,0x00}, // 0xC0
-{0x04,0x04,0x04,0x1F,0x00,0x00,0x00,0x00}, // 0xC1
-{0x00,0x00,0x00,0x1F,0x04,0x04,0x04,0x04}, // 0xC2
-{0x04,0x04,0x04,0x07,0x04,0x04,0x04,0x04}, // 0xC3
-{0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00}, // 0xC4
-{0x04,0x04,0x04,0x1F,0x04,0x04,0x04,0x04}, // 0xC5
-{0x0D,0x12,0x0C,0x02,0x0E,0x0F,0x00,0x00}, // 0xC6
-{0x0D,0x12,0x04,0x0A,0x1F,0x11,0x00,0x00}, // 0xC7
-{0x0A,0x0A,0x0B,0x08,0x0F,0x00,0x00,0x00}, // 0xC8
-{0x00,0x00,0x0F,0x08,0x0B,0x0A,0x0A,0x0A}, // 0xC9
-{0x0A,0x0A,0x1B,0x00,0x1F,0x00,0x00,0x00}, // 0xCA
-{0x00,0x00,0x1F,0x00,0x1B,0x0A,0x0A,0x0A}, // 0xCB
-{0x0A,0x0A,0x0B,0x08,0x0B,0x0A,0x0A,0x0A}, // 0xCC
-{0x00,0x00,0x1F,0x00,0x1F,0x00,0x00,0x00}, // 0xCD
-{0x0A,0x0A,0x1B,0x00,0x1B,0x0A,0x0A,0x0A}, // 0xCE
-{0x00,0x11,0x0E,0x0A,0x0E,0x11,0x00,0x00}, // 0xCF
-{0x1E,0x04,0x0E,0x12,0x12,0x0C,0x00,0x00}, // 0xD0
-{0x00,0x0E,0x09,0x1D,0x09,0x0E,0x00,0x00}, // 0xD1
-{0x0E,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0xD2
-{0x11,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0xD3
-{0x10,0x0E,0x08,0x0E,0x08,0x0E,0x00,0x00}, // 0xD4
-{0x00,0x00,0x0C,0x04,0x04,0x04,0x00,0x00}, // 0xD5
-{0x01,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0xD6
-{0x0E,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0xD7
-{0x11,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0xD8
-{0x04,0x04,0x04,0x1C,0x00,0x00,0x00,0x00}, // 0xD9
-{0x00,0x00,0x00,0x07,0x04,0x04,0x04,0x04}, // 0xDA
-{0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F}, // 0xDB
-{0x00,0x00,0x00,0x00,0x1F,0x1F,0x1F,0x1F}, // 0xDC
-{0x04,0x04,0x04,0x00,0x00,0x04,0x04,0x04}, // 0xDD
-{0x10,0x0E,0x04,0x04,0x04,0x0E,0x00,0x00}, // 0xDE
-{0x1F,0x1F,0x1F,0x1F,0x00,0x00,0x00,0x00}, // 0xDF
-{0x01,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0xE0
-{0x04,0x0A,0x0A,0x0A,0x09,0x0A,0x00,0x00}, // 0xE1
-{0x0E,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0xE2
-{0x10,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0xE3
-{0x0D,0x12,0x06,0x09,0x09,0x06,0x00,0x00}, // 0xE4
-{0x1E,0x0E,0x11,0x11,0x11,0x0E,0x00,0x00}, // 0xE5
-{0x00,0x00,0x09,0x09,0x0B,0x0D,0x08,0x00}, // 0xE6
-{0x08,0x08,0x0E,0x09,0x09,0x0E,0x08,0x00}, // 0xE7
-{0x00,0x08,0x0E,0x09,0x0E,0x08,0x00,0x00}, // 0xE8
-{0x01,0x12,0x12,0x12,0x12,0x0C,0x00,0x00}, // 0xE9
-{0x0F,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0xEA
-{0x10,0x09,0x09,0x09,0x09,0x06,0x00,0x00}, // 0xEB
-{0x01,0x02,0x09,0x09,0x06,0x06,0x18,0x00}, // 0xEC
-{0x02,0x15,0x0A,0x04,0x04,0x04,0x00,0x00}, // 0xED
-{0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEE
-{0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEF
-{0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00}, // 0xF0
-{0x00,0x00,0x04,0x0E,0x04,0x0E,0x00,0x00}, // 0xF1
-{0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x1F}, // 0xF2
-{0x19,0x1A,0x0A,0x1D,0x0B,0x11,0x00,0x00}, // 0xF3
-{0x0E,0x1A,0x1A,0x0A,0x0A,0x0A,0x0A,0x00}, // 0xF4
-{0x06,0x08,0x04,0x0A,0x04,0x02,0x0C,0x00}, // 0xF5
-{0x00,0x04,0x00,0x0E,0x00,0x04,0x00,0x00}, // 0xF6
-{0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x08}, // 0xF7
-{0x06,0x09,0x09,0x06,0x00,0x00,0x00,0x00}, // 0xF8
-{0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF9
-{0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00}, // 0xFA
-{0x0C,0x04,0x04,0x04,0x0E,0x00,0x00,0x00}, // 0xFB
-{0x0C,0x02,0x0C,0x02,0x0C,0x00,0x00,0x00}, // 0xFC
-{0x0C,0x02,0x04,0x08,0x0E,0x00,0x00,0x00}, // 0xFD
-{0x00,0x00,0x0F,0x0F,0x0F,0x0F,0x00,0x00}, // 0xFE
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} // 0xFF
-};
-
-#endif // font_5x8_horizontal_MSB_h
\ No newline at end of file
diff --git a/lib/lib_display/LedControl/src/font_8x8_horizontal_latin_MSB.h b/lib/lib_display/LedControl/src/font_8x8_horizontal_latin_MSB.h
deleted file mode 100644
index e1a8af7ae..000000000
--- a/lib/lib_display/LedControl/src/font_8x8_horizontal_latin_MSB.h
+++ /dev/null
@@ -1,265 +0,0 @@
-#ifndef font_8x8_horizontal_latin_MSB_h
-#define font_8x8_horizontal_latin_MSB_h
-
-const unsigned int font_char_width = 8;
-const unsigned int font_char_height = 8;
-
-const char font[256][8]={
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
-{0x0E,0x11,0x1B,0x11,0x15,0x11,0x0E,0x00}, // 0x01
-{0x0E,0x1F,0x15,0x1F,0x11,0x1F,0x0E,0x00}, // 0x02
-{0x00,0x0A,0x1F,0x1F,0x1F,0x0E,0x04,0x00}, // 0x03
-{0x00,0x04,0x0E,0x1F,0x1F,0x0E,0x04,0x00}, // 0x04
-{0x04,0x0E,0x0E,0x04,0x1F,0x1F,0x04,0x00}, // 0x05
-{0x00,0x04,0x0E,0x1F,0x1F,0x04,0x0E,0x00}, // 0x06
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
-{0x00,0x07,0x03,0x0D,0x12,0x12,0x0C,0x00}, // 0x0B
-{0x0E,0x11,0x11,0x0E,0x04,0x0E,0x04,0x00}, // 0x0C
-{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
-{0x03,0x0D,0x0B,0x0D,0x0B,0x1B,0x18,0x00}, // 0x0E
-{0x00,0x15,0x0E,0x1B,0x0E,0x15,0x00,0x00}, // 0x0F
-{0x08,0x0C,0x0E,0x0F,0x0E,0x0C,0x08,0x00}, // 0x10
-{0x02,0x06,0x0E,0x1E,0x0E,0x06,0x02,0x00}, // 0x11
-{0x04,0x0E,0x1F,0x04,0x1F,0x0E,0x04,0x00}, // 0x12
-{0x0A,0x0A,0x0A,0x0A,0x0A,0x00,0x0A,0x00}, // 0x13
-{0x0F,0x15,0x15,0x0D,0x05,0x05,0x05,0x00}, // 0x14
-{0x0E,0x11,0x0C,0x0A,0x06,0x11,0x0E,0x00}, // 0x15
-{0x00,0x00,0x00,0x00,0x00,0x1E,0x1E,0x00}, // 0x16
-{0x04,0x0E,0x1F,0x04,0x1F,0x0E,0x04,0x0E}, // 0x17
-{0x04,0x0E,0x1F,0x04,0x04,0x04,0x04,0x00}, // 0x18
-{0x04,0x04,0x04,0x04,0x1F,0x0E,0x04,0x00}, // 0x19
-{0x00,0x04,0x06,0x1F,0x06,0x04,0x00,0x00}, // 0x1A
-{0x00,0x04,0x0C,0x1F,0x0C,0x04,0x00,0x00}, // 0x1B
-{0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x00}, // 0x1C
-{0x00,0x0A,0x0A,0x1F,0x0A,0x0A,0x00,0x00}, // 0x1D
-{0x04,0x04,0x0E,0x0E,0x1F,0x1F,0x00,0x00}, // 0x1E
-{0x1F,0x1F,0x0E,0x0E,0x04,0x04,0x00,0x00}, // 0x1F
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0020 (space)
- { 0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00}, // U+0021 (!)
- { 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0022 (")
- { 0x36, 0x36, 0x7F, 0x36, 0x7F, 0x36, 0x36, 0x00}, // U+0023 (#)
- { 0x0C, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x0C, 0x00}, // U+0024 ($)
- { 0x00, 0x63, 0x33, 0x18, 0x0C, 0x66, 0x63, 0x00}, // U+0025 (%)
- { 0x1C, 0x36, 0x1C, 0x6E, 0x3B, 0x33, 0x6E, 0x00}, // U+0026 (&)
- { 0x06, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0027 (')
- { 0x18, 0x0C, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x00}, // U+0028 (()
- { 0x06, 0x0C, 0x18, 0x18, 0x18, 0x0C, 0x06, 0x00}, // U+0029 ())
- { 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00}, // U+002A (*)
- { 0x00, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x00, 0x00}, // U+002B (+)
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+002C (,)
- { 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00}, // U+002D (-)
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+002E (.)
- { 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00}, // U+002F (/)
- { 0x3E, 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x3E, 0x00}, // U+0030 (0)
- { 0x0C, 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x3F, 0x00}, // U+0031 (1)
- { 0x1E, 0x33, 0x30, 0x1C, 0x06, 0x33, 0x3F, 0x00}, // U+0032 (2)
- { 0x1E, 0x33, 0x30, 0x1C, 0x30, 0x33, 0x1E, 0x00}, // U+0033 (3)
- { 0x38, 0x3C, 0x36, 0x33, 0x7F, 0x30, 0x78, 0x00}, // U+0034 (4)
- { 0x3F, 0x03, 0x1F, 0x30, 0x30, 0x33, 0x1E, 0x00}, // U+0035 (5)
- { 0x1C, 0x06, 0x03, 0x1F, 0x33, 0x33, 0x1E, 0x00}, // U+0036 (6)
- { 0x3F, 0x33, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x00}, // U+0037 (7)
- { 0x1E, 0x33, 0x33, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+0038 (8)
- { 0x1E, 0x33, 0x33, 0x3E, 0x30, 0x18, 0x0E, 0x00}, // U+0039 (9)
- { 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+003A (:)
- { 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+003B (;)
- { 0x18, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x18, 0x00}, // U+003C (<)
- { 0x00, 0x00, 0x3F, 0x00, 0x00, 0x3F, 0x00, 0x00}, // U+003D (=)
- { 0x06, 0x0C, 0x18, 0x30, 0x18, 0x0C, 0x06, 0x00}, // U+003E (>)
- { 0x1E, 0x33, 0x30, 0x18, 0x0C, 0x00, 0x0C, 0x00}, // U+003F (?)
- { 0x3E, 0x63, 0x7B, 0x7B, 0x7B, 0x03, 0x1E, 0x00}, // U+0040 (@)
- { 0x0C, 0x1E, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x00}, // U+0041 (A)
- { 0x3F, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3F, 0x00}, // U+0042 (B)
- { 0x3C, 0x66, 0x03, 0x03, 0x03, 0x66, 0x3C, 0x00}, // U+0043 (C)
- { 0x1F, 0x36, 0x66, 0x66, 0x66, 0x36, 0x1F, 0x00}, // U+0044 (D)
- { 0x7F, 0x46, 0x16, 0x1E, 0x16, 0x46, 0x7F, 0x00}, // U+0045 (E)
- { 0x7F, 0x46, 0x16, 0x1E, 0x16, 0x06, 0x0F, 0x00}, // U+0046 (F)
- { 0x3C, 0x66, 0x03, 0x03, 0x73, 0x66, 0x7C, 0x00}, // U+0047 (G)
- { 0x33, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x33, 0x00}, // U+0048 (H)
- { 0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0049 (I)
- { 0x78, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E, 0x00}, // U+004A (J)
- { 0x67, 0x66, 0x36, 0x1E, 0x36, 0x66, 0x67, 0x00}, // U+004B (K)
- { 0x0F, 0x06, 0x06, 0x06, 0x46, 0x66, 0x7F, 0x00}, // U+004C (L)
- { 0x63, 0x77, 0x7F, 0x7F, 0x6B, 0x63, 0x63, 0x00}, // U+004D (M)
- { 0x63, 0x67, 0x6F, 0x7B, 0x73, 0x63, 0x63, 0x00}, // U+004E (N)
- { 0x1C, 0x36, 0x63, 0x63, 0x63, 0x36, 0x1C, 0x00}, // U+004F (O)
- { 0x3F, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x0F, 0x00}, // U+0050 (P)
- { 0x1E, 0x33, 0x33, 0x33, 0x3B, 0x1E, 0x38, 0x00}, // U+0051 (Q)
- { 0x3F, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x67, 0x00}, // U+0052 (R)
- { 0x1E, 0x33, 0x07, 0x0E, 0x38, 0x33, 0x1E, 0x00}, // U+0053 (S)
- { 0x3F, 0x2D, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0054 (T)
- { 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x00}, // U+0055 (U)
- { 0x33, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0056 (V)
- { 0x63, 0x63, 0x63, 0x6B, 0x7F, 0x77, 0x63, 0x00}, // U+0057 (W)
- { 0x63, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x00}, // U+0058 (X)
- { 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x0C, 0x1E, 0x00}, // U+0059 (Y)
- { 0x7F, 0x63, 0x31, 0x18, 0x4C, 0x66, 0x7F, 0x00}, // U+005A (Z)
- { 0x1E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x1E, 0x00}, // U+005B ([)
- { 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40, 0x00}, // U+005C (\)
- { 0x1E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1E, 0x00}, // U+005D (])
- { 0x08, 0x1C, 0x36, 0x63, 0x00, 0x00, 0x00, 0x00}, // U+005E (^)
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF}, // U+005F (_)
- { 0x0C, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0060 (`)
- { 0x00, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x6E, 0x00}, // U+0061 (a)
- { 0x07, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00}, // U+0062 (b)
- { 0x00, 0x00, 0x1E, 0x33, 0x03, 0x33, 0x1E, 0x00}, // U+0063 (c)
- { 0x38, 0x30, 0x30, 0x3e, 0x33, 0x33, 0x6E, 0x00}, // U+0064 (d)
- { 0x00, 0x00, 0x1E, 0x33, 0x3f, 0x03, 0x1E, 0x00}, // U+0065 (e)
- { 0x1C, 0x36, 0x06, 0x0f, 0x06, 0x06, 0x0F, 0x00}, // U+0066 (f)
- { 0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0067 (g)
- { 0x07, 0x06, 0x36, 0x6E, 0x66, 0x66, 0x67, 0x00}, // U+0068 (h)
- { 0x0C, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0069 (i)
- { 0x30, 0x00, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E}, // U+006A (j)
- { 0x07, 0x06, 0x66, 0x36, 0x1E, 0x36, 0x67, 0x00}, // U+006B (k)
- { 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+006C (l)
- { 0x00, 0x00, 0x33, 0x7F, 0x7F, 0x6B, 0x63, 0x00}, // U+006D (m)
- { 0x00, 0x00, 0x1F, 0x33, 0x33, 0x33, 0x33, 0x00}, // U+006E (n)
- { 0x00, 0x00, 0x1E, 0x33, 0x33, 0x33, 0x1E, 0x00}, // U+006F (o)
- { 0x00, 0x00, 0x3B, 0x66, 0x66, 0x3E, 0x06, 0x0F}, // U+0070 (p)
- { 0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x78}, // U+0071 (q)
- { 0x00, 0x00, 0x3B, 0x6E, 0x66, 0x06, 0x0F, 0x00}, // U+0072 (r)
- { 0x00, 0x00, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x00}, // U+0073 (s)
- { 0x08, 0x0C, 0x3E, 0x0C, 0x0C, 0x2C, 0x18, 0x00}, // U+0074 (t)
- { 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x6E, 0x00}, // U+0075 (u)
- { 0x00, 0x00, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0076 (v)
- { 0x00, 0x00, 0x63, 0x6B, 0x7F, 0x7F, 0x36, 0x00}, // U+0077 (w)
- { 0x00, 0x00, 0x63, 0x36, 0x1C, 0x36, 0x63, 0x00}, // U+0078 (x)
- { 0x00, 0x00, 0x33, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0079 (y)
- { 0x00, 0x00, 0x3F, 0x19, 0x0C, 0x26, 0x3F, 0x00}, // U+007A (z)
- { 0x38, 0x0C, 0x0C, 0x07, 0x0C, 0x0C, 0x38, 0x00}, // U+007B ({)
- { 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, // U+007C (|)
- { 0x07, 0x0C, 0x0C, 0x38, 0x0C, 0x0C, 0x07, 0x00}, // U+007D (})
- { 0x6E, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007E (~)
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007F{0x0E,0x11,0x10,0x10,0x11,0x0E,0x04,0x0C}, // 0x80
-{0x12,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x81
-{0x03,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x82
-{0x0E,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x83
-{0x0A,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x84
-{0x0C,0x00,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x85
-{0x0E,0x0A,0x0E,0x01,0x0F,0x11,0x0F,0x00}, // 0x86
-{0x00,0x0E,0x11,0x10,0x11,0x0E,0x04,0x0C}, // 0x87
-{0x0E,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x88
-{0x0A,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x89
-{0x0C,0x00,0x0E,0x11,0x1E,0x10,0x0E,0x00}, // 0x8A
-{0x0A,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8B
-{0x0E,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8C
-{0x08,0x00,0x04,0x04,0x04,0x04,0x06,0x00}, // 0x8D
-{0x0A,0x00,0x04,0x0A,0x11,0x1F,0x11,0x00}, // 0x8E
-{0x0E,0x0A,0x0E,0x1B,0x11,0x1F,0x11,0x00}, // 0x8F
-{0x03,0x00,0x1F,0x10,0x1E,0x10,0x1F,0x00}, // 0x90
-{0x00,0x00,0x1E,0x05,0x1F,0x14,0x0F,0x00}, // 0x91
-{0x0F,0x14,0x14,0x1F,0x14,0x14,0x17,0x00}, // 0x92
-{0x0E,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x93
-{0x0A,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x94
-{0x18,0x00,0x0C,0x12,0x12,0x12,0x0C,0x00}, // 0x95
-{0x0E,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x96
-{0x18,0x00,0x12,0x12,0x12,0x16,0x0A,0x00}, // 0x97
-{0x0A,0x00,0x12,0x12,0x12,0x0E,0x04,0x18}, // 0x98
-{0x12,0x0C,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0x99
-{0x0A,0x00,0x12,0x12,0x12,0x12,0x0C,0x00}, // 0x9A
-{0x00,0x00,0x01,0x0E,0x16,0x1A,0x1C,0x20}, // 0x9B
-{0x06,0x09,0x08,0x1E,0x08,0x09,0x17,0x00}, // 0x9C
-{0x0F,0x13,0x15,0x15,0x15,0x19,0x1E,0x00}, // 0x9D
-{0x00,0x11,0x0A,0x04,0x0A,0x11,0x00,0x00}, // 0x9E
-{0x02,0x05,0x04,0x0E,0x04,0x04,0x14,0x08}, // 0x9F
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00A0 (no break space)
- { 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00}, // U+00A1 (inverted !)
- { 0x18, 0x18, 0x7E, 0x03, 0x03, 0x7E, 0x18, 0x18}, // U+00A2 (dollarcents)
- { 0x1C, 0x36, 0x26, 0x0F, 0x06, 0x67, 0x3F, 0x00}, // U+00A3 (pound sterling)
- { 0x00, 0x00, 0x63, 0x3E, 0x36, 0x3E, 0x63, 0x00}, // U+00A4 (currency mark)
- { 0x33, 0x33, 0x1E, 0x3F, 0x0C, 0x3F, 0x0C, 0x0C}, // U+00A5 (yen)
- { 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, // U+00A6 (broken pipe)
- { 0x7C, 0xC6, 0x1C, 0x36, 0x36, 0x1C, 0x33, 0x1E}, // U+00A7 (paragraph)
- { 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00A8 (diaeresis)
- { 0x3C, 0x42, 0x99, 0x85, 0x85, 0x99, 0x42, 0x3C}, // U+00A9 (copyright symbol)
- { 0x3C, 0x36, 0x36, 0x7C, 0x00, 0x00, 0x00, 0x00}, // U+00AA (superscript a)
- { 0x00, 0xCC, 0x66, 0x33, 0x66, 0xCC, 0x00, 0x00}, // U+00AB (<<)
- { 0x00, 0x00, 0x00, 0x3F, 0x30, 0x30, 0x00, 0x00}, // U+00AC (gun pointing left)
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00AD (soft hyphen)
- { 0x3C, 0x42, 0x9D, 0xA5, 0x9D, 0xA5, 0x42, 0x3C}, // U+00AE (registered symbol)
- { 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00AF (macron)
- { 0x1C, 0x36, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00}, // U+00B0 (degree)
- { 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x7E, 0x00}, // U+00B1 (plusminus)
- { 0x1C, 0x30, 0x18, 0x0C, 0x3C, 0x00, 0x00, 0x00}, // U+00B2 (superscript 2)
- { 0x1C, 0x30, 0x18, 0x30, 0x1C, 0x00, 0x00, 0x00}, // U+00B2 (superscript 3)
- { 0x18, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+00B2 (aigu)
- { 0x00, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x06, 0x03}, // U+00B5 (mu)
- { 0xFE, 0xDB, 0xDB, 0xDE, 0xD8, 0xD8, 0xD8, 0x00}, // U+00B6 (pilcrow)
- { 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00}, // U+00B7 (central dot)
- { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x1E}, // U+00B8 (cedille)
- { 0x08, 0x0C, 0x08, 0x1C, 0x00, 0x00, 0x00, 0x00}, // U+00B9 (superscript 1)
- { 0x1C, 0x36, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00}, // U+00BA (superscript 0)
- { 0x00, 0x33, 0x66, 0xCC, 0x66, 0x33, 0x00, 0x00}, // U+00BB (>>)
- { 0xC3, 0x63, 0x33, 0xBD, 0xEC, 0xF6, 0xF3, 0x03}, // U+00BC (1/4)
- { 0xC3, 0x63, 0x33, 0x7B, 0xCC, 0x66, 0x33, 0xF0}, // U+00BD (1/2)
- { 0x03, 0xC4, 0x63, 0xB4, 0xDB, 0xAC, 0xE6, 0x80}, // U+00BE (3/4)
- { 0x0C, 0x00, 0x0C, 0x06, 0x03, 0x33, 0x1E, 0x00}, // U+00BF (inverted ?)
- { 0x07, 0x00, 0x1C, 0x36, 0x63, 0x7F, 0x63, 0x00}, // U+00C0 (A grave)
- { 0x70, 0x00, 0x1C, 0x36, 0x63, 0x7F, 0x63, 0x00}, // U+00C1 (A aigu)
- { 0x1C, 0x36, 0x00, 0x3E, 0x63, 0x7F, 0x63, 0x00}, // U+00C2 (A circumflex)
- { 0x6E, 0x3B, 0x00, 0x3E, 0x63, 0x7F, 0x63, 0x00}, // U+00C3 (A ~)
- { 0x63, 0x1C, 0x36, 0x63, 0x7F, 0x63, 0x63, 0x00}, // U+00C4 (A umlaut)
- { 0x0C, 0x0C, 0x00, 0x1E, 0x33, 0x3F, 0x33, 0x00}, // U+00C5 (A ring)
- { 0x7C, 0x36, 0x33, 0x7F, 0x33, 0x33, 0x73, 0x00}, // U+00C6 (AE)
- { 0x1E, 0x33, 0x03, 0x33, 0x1E, 0x18, 0x30, 0x1E}, // U+00C7 (C cedille)
- { 0x07, 0x00, 0x3F, 0x06, 0x1E, 0x06, 0x3F, 0x00}, // U+00C8 (E grave)
- { 0x38, 0x00, 0x3F, 0x06, 0x1E, 0x06, 0x3F, 0x00}, // U+00C9 (E aigu)
- { 0x0C, 0x12, 0x3F, 0x06, 0x1E, 0x06, 0x3F, 0x00}, // U+00CA (E circumflex)
- { 0x36, 0x00, 0x3F, 0x06, 0x1E, 0x06, 0x3F, 0x00}, // U+00CB (E umlaut)
- { 0x07, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00CC (I grave)
- { 0x38, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00CD (I aigu)
- { 0x0C, 0x12, 0x00, 0x1E, 0x0C, 0x0C, 0x1E, 0x00}, // U+00CE (I circumflex)
- { 0x33, 0x00, 0x1E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00CF (I umlaut)
- { 0x3F, 0x66, 0x6F, 0x6F, 0x66, 0x66, 0x3F, 0x00}, // U+00D0 (Eth)
- { 0x3F, 0x00, 0x33, 0x37, 0x3F, 0x3B, 0x33, 0x00}, // U+00D1 (N ~)
- { 0x0E, 0x00, 0x18, 0x3C, 0x66, 0x3C, 0x18, 0x00}, // U+00D2 (O grave)
- { 0x70, 0x00, 0x18, 0x3C, 0x66, 0x3C, 0x18, 0x00}, // U+00D3 (O aigu)
- { 0x3C, 0x66, 0x18, 0x3C, 0x66, 0x3C, 0x18, 0x00}, // U+00D4 (O circumflex)
- { 0x6E, 0x3B, 0x00, 0x3E, 0x63, 0x63, 0x3E, 0x00}, // U+00D5 (O ~)
- { 0xC3, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x18, 0x00}, // U+00D6 (O umlaut)
- { 0x00, 0x36, 0x1C, 0x08, 0x1C, 0x36, 0x00, 0x00}, // U+00D7 (multiplicative x)
- { 0x5C, 0x36, 0x73, 0x7B, 0x6F, 0x36, 0x1D, 0x00}, // U+00D8 (O stroke)
- { 0x0E, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00}, // U+00D9 (U grave)
- { 0x70, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00}, // U+00DA (U aigu)
- { 0x3C, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x00}, // U+00DB (U circumflex)
- { 0x33, 0x00, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x00}, // U+00DC (U umlaut)
- { 0x70, 0x00, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x00}, // U+00DD (Y aigu)
- { 0x0F, 0x06, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x0F}, // U+00DE (Thorn)
- { 0x00, 0x1E, 0x33, 0x1F, 0x33, 0x1F, 0x03, 0x03}, // U+00DF (beta)
- { 0x07, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E0 (a grave)
- { 0x38, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E1 (a aigu)
- { 0x7E, 0xC3, 0x3C, 0x60, 0x7C, 0x66, 0xFC, 0x00}, // U+00E2 (a circumflex)
- { 0x6E, 0x3B, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E3 (a ~)
- { 0x33, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E4 (a umlaut)
- { 0x0C, 0x0C, 0x1E, 0x30, 0x3E, 0x33, 0x7E, 0x00}, // U+00E5 (a ring)
- { 0x00, 0x00, 0xFE, 0x30, 0xFE, 0x33, 0xFE, 0x00}, // U+00E6 (ae)
- { 0x00, 0x00, 0x1E, 0x03, 0x03, 0x1E, 0x30, 0x1C}, // U+00E7 (c cedille)
- { 0x07, 0x00, 0x1E, 0x33, 0x3F, 0x03, 0x1E, 0x00}, // U+00E8 (e grave)
- { 0x38, 0x00, 0x1E, 0x33, 0x3F, 0x03, 0x1E, 0x00}, // U+00E9 (e aigu)
- { 0x7E, 0xC3, 0x3C, 0x66, 0x7E, 0x06, 0x3C, 0x00}, // U+00EA (e circumflex)
- { 0x33, 0x00, 0x1E, 0x33, 0x3F, 0x03, 0x1E, 0x00}, // U+00EB (e umlaut)
- { 0x07, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00EC (i grave)
- { 0x1C, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00ED (i augu)
- { 0x3E, 0x63, 0x1C, 0x18, 0x18, 0x18, 0x3C, 0x00}, // U+00EE (i circumflex)
- { 0x33, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+00EF (i umlaut)
- { 0x1B, 0x0E, 0x1B, 0x30, 0x3E, 0x33, 0x1E, 0x00}, // U+00F0 (eth)
- { 0x00, 0x1F, 0x00, 0x1F, 0x33, 0x33, 0x33, 0x00}, // U+00F1 (n ~)
- { 0x00, 0x07, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F2 (o grave)
- { 0x00, 0x38, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F3 (o aigu)
- { 0x1E, 0x33, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F4 (o circumflex)
- { 0x6E, 0x3B, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F5 (o ~)
- { 0x00, 0x33, 0x00, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+00F6 (o umlaut)
- { 0x18, 0x18, 0x00, 0x7E, 0x00, 0x18, 0x18, 0x00}, // U+00F7 (division)
- { 0x00, 0x60, 0x3C, 0x76, 0x7E, 0x6E, 0x3C, 0x06}, // U+00F8 (o stroke)
- { 0x00, 0x07, 0x00, 0x33, 0x33, 0x33, 0x7E, 0x00}, // U+00F9 (u grave)
- { 0x00, 0x38, 0x00, 0x33, 0x33, 0x33, 0x7E, 0x00}, // U+00FA (u aigu)
- { 0x1E, 0x33, 0x00, 0x33, 0x33, 0x33, 0x7E, 0x00}, // U+00FB (u circumflex)
- { 0x00, 0x33, 0x00, 0x33, 0x33, 0x33, 0x7E, 0x00}, // U+00FC (u umlaut)
- { 0x00, 0x38, 0x00, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+00FD (y aigu)
- { 0x00, 0x00, 0x06, 0x3E, 0x66, 0x3E, 0x06, 0x00}, // U+00FE (thorn)
- { 0x00, 0x33, 0x00, 0x33, 0x33, 0x3E, 0x30, 0x1F} // U+00FF (y umlaut)
-};
-
-#endif
\ No newline at end of file
diff --git a/tasmota/xdsp_19_max7219_matrix.ino b/tasmota/xdsp_19_max7219_matrix.ino
index 3ec3ac332..82a4a24bb 100644
--- a/tasmota/xdsp_19_max7219_matrix.ino
+++ b/tasmota/xdsp_19_max7219_matrix.ino
@@ -113,22 +113,31 @@ bool MAX7291Matrix_initDriver(void)
}
Settings->display_model = XDSP_19;
+ renderer = nullptr; // renderer not yet used
if (Settings->display_width) // [pixel]
{
LedMatrix_settings.modulesPerRow = (Settings->display_width - 1) / 8 + 1;
}
Settings->display_width = 8 * LedMatrix_settings.modulesPerRow;
- Settings->display_cols[0] = Settings->display_width;
+ Settings->display_cols[0] = LedMatrix_settings.modulesPerRow;
if (Settings->display_height) // [pixel]
{
LedMatrix_settings.modulesPerCol = (Settings->display_height - 1) / 8 + 1;
}
- Settings->display_height = 8 * LedMatrix_settings. modulesPerCol;
- Settings->display_rows = Settings->display_height;
- Settings->display_cols[1] = Settings->display_height;
+ Settings->display_height = 8 * LedMatrix_settings.modulesPerCol;
+ Settings->display_rows = LedMatrix_settings.modulesPerCol;
+ Settings->display_cols[1] = LedMatrix_settings.modulesPerCol;
max7219_Matrix = new LedMatrix(Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), LedMatrix_settings.modulesPerRow, LedMatrix_settings.modulesPerCol);
+ if( LedMatrix_settings.show_clock == 0)
+ {
+ Settings->display_mode = 0; // text mode
+ }
+ else{
+ Settings->display_mode = 1; // clock mode
+ }
max2791Matrix_initDriver_done = true;
+ AddLog(LOG_LEVEL_INFO, PSTR("MTX: MAX7291Matrix_initDriver DIN:%d CLK:%d CS:%d size(%dx%d)"), Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), LedMatrix_settings.modulesPerRow, LedMatrix_settings.modulesPerCol);
return MAX7291Matrix_init();
}
@@ -137,12 +146,17 @@ bool MAX7291Matrix_init(void)
{
int intensity = GetDisplayDimmer16(); // 0..15
max7219_Matrix->setIntensity(intensity);
- int orientation = Settings->display_rotate;
- max7219_Matrix->setOrientation((LedMatrix::ModuleOrientation)orientation );
- AddLog(LOG_LEVEL_INFO, PSTR("MTX: MAX7291Matrix_init %dx%d modules, orientation: %d, intensity: %d"), LedMatrix_settings.modulesPerRow , LedMatrix_settings.modulesPerCol, orientation, intensity);
-
- //max7219_Matrix->test();
- AddLog(LOG_LEVEL_INFO, PSTR("MTX: display test"));
+ if(Settings->display_rotate <= 3)
+ {
+ max7219_Matrix->setOrientation((LedMatrix::ModuleOrientation)Settings->display_rotate );
+ }
+ else
+ {
+ // default for most 32x8 modules
+ Settings->display_rotate = LedMatrix::ORIENTATION_UPSIDE_DOWN;
+ max7219_Matrix->setOrientation( LedMatrix::ORIENTATION_UPSIDE_DOWN );
+ }
+ AddLog(LOG_LEVEL_INFO, PSTR("MTX: MAX7291Matrix_init orientation: %d, intensity: %d"), Settings->display_rotate, intensity);
return true;
}
@@ -183,28 +197,38 @@ bool MAX7291Matrix_clock(void)
{
LedMatrix_settings.show_clock = XdrvMailbox.payload;
if (ArgC() == 0)
- XdrvMailbox.payload = 1;
- if (XdrvMailbox.payload > 1)
- {
- LedMatrix_settings.timeFormat = "%H:%M";
- if(LedMatrix_settings.modulesPerRow > 6)
- {
- LedMatrix_settings.timeFormat = "%H:%M:%S";
- }
XdrvMailbox.payload = 2;
- }
- else
- {
- LedMatrix_settings.timeFormat = "%I:%M";
- if(LedMatrix_settings.modulesPerRow > 6)
+ switch(XdrvMailbox.payload)
{
- LedMatrix_settings.timeFormat = "%I:%M:%S";
+ case 0:
+ // no clock, switch to text mode
+ Settings->display_mode = 0;
+ return true;
+ case 1:
+ // 12 h clock
+ LedMatrix_settings.timeFormat = "%I:%M";
+ if(LedMatrix_settings.modulesPerRow > 6)
+ {
+ LedMatrix_settings.timeFormat = "%I:%M:%S";
+ }
+ Settings->display_mode = 1;
+ break;
+ case 2:
+ // 24 h clock
+ LedMatrix_settings.timeFormat = "%H:%M";
+ if(LedMatrix_settings.modulesPerRow > 6)
+ {
+ LedMatrix_settings.timeFormat = "%H:%M:%S";
+ }
+ Settings->display_mode = 1;
+ break;
+ default:
+ return false;
}
- XdrvMailbox.payload = 1;
- }
AddLog(LOG_LEVEL_DEBUG, PSTR("MTX: LedMatrix_settings.show_clock %d, timeFormat %s"), LedMatrix_settings.show_clock, LedMatrix_settings.timeFormat);
+ max7219_Matrix->clearDisplay();
MAX7291Matrix_showTime();
return true;
}
@@ -220,7 +244,7 @@ bool MAX7291Matrix_showTime()
timeinfo = localtime(&rawtime);
strftime(timeStr, 10, LedMatrix_settings.timeFormat, timeinfo);
- max7219_Matrix->drawText(timeStr);
+ max7219_Matrix->drawText(timeStr, false); // false: do not clear desplay on update to prevent flicker
return true;
}
#endif // USE_DISPLAY_MODES1TO5
@@ -254,7 +278,16 @@ bool Xdsp19(uint8_t function)
result = max7219_Matrix->setIntensity(GetDisplayDimmer16());
break;
case FUNC_DISPLAY_DRAW_STRING:
- result = max7219_Matrix->drawText(dsp_str);
+ case FUNC_DISPLAY_SCROLLTEXT:
+ case FUNC_DISPLAY_SEVENSEG_TEXT:
+ Settings->display_mode = 0; // text mode
+ LedMatrix_settings.show_clock = 0; // disable clock mode
+ result = max7219_Matrix->drawText(XdrvMailbox.data, true); // true: clears display before drawing text
+ break;
+ case FUNC_DISPLAY_SEVENSEG_TEXTNC:
+ Settings->display_mode = 0; // text mode
+ LedMatrix_settings.show_clock = 0; // disable clock mode
+ result = max7219_Matrix->drawText(XdrvMailbox.data, false); // false: does not clear display before drawing text
break;
case FUNC_DISPLAY_SCROLLDELAY:
result = MAX7291Matrix_scrollDelay();
From 09974f8873fa1ffdb8eeb19f4568e6dec31b7ed1 Mon Sep 17 00:00:00 2001
From: Michael
Date: Tue, 30 Nov 2021 14:18:26 +0100
Subject: [PATCH 012/402] Command for all Modules at once
---
lib/lib_display/LedControl/src/LedControl.cpp | 67 ++++++++++++++-----
lib/lib_display/LedControl/src/LedControl.h | 9 ++-
lib/lib_display/LedControl/src/LedMatrix.cpp | 56 +++++++++++++---
lib/lib_display/LedControl/src/LedMatrix.h | 1 +
4 files changed, 104 insertions(+), 29 deletions(-)
diff --git a/lib/lib_display/LedControl/src/LedControl.cpp b/lib/lib_display/LedControl/src/LedControl.cpp
index 11e7a2908..baaa3802c 100644
--- a/lib/lib_display/LedControl/src/LedControl.cpp
+++ b/lib/lib_display/LedControl/src/LedControl.cpp
@@ -55,18 +55,20 @@ LedControl::LedControl(int dataPin, int clkPin, int csPin, int numDevices) {
pinMode(SPI_CS,OUTPUT);
digitalWrite(SPI_CS,HIGH);
SPI_MOSI=dataPin;
- for (int i = 0; i < 8 * MAX72XX_MAX_DEVICES; i++)
- status[i] = 0x00;
- for(int i=0;i=maxDevices)
return;
@@ -89,6 +96,13 @@ void LedControl::setScanLimit(int addr, int limit) {
spiTransfer(addr, OP_SCANLIMIT,limit);
}
+void LedControl::setScanLimit_allDevices(int limit) {
+ if(limit <0 || limit>8) return;
+
+ memset(deviceDataBuff, (byte)limit, maxDevices);
+ spiTransfer_allDevices(OP_SCANLIMIT,deviceDataBuff);
+}
+
void LedControl::setIntensity(int addr, int intensity) {
if(addr<0 || addr>=maxDevices)
return;
@@ -96,6 +110,15 @@ void LedControl::setIntensity(int addr, int intensity) {
spiTransfer(addr, OP_INTENSITY,intensity);
}
+void LedControl::setIntensity_allDevices(int intensity)
+{
+ if (intensity < 0 | intensity > 15)
+ return;
+
+ memset(deviceDataBuff, (byte)intensity, maxDevices);
+ spiTransfer_allDevices(OP_INTENSITY, deviceDataBuff);
+}
+
void LedControl::clearDisplay(int addr) {
int offset;
@@ -108,6 +131,16 @@ void LedControl::clearDisplay(int addr) {
}
}
+void LedControl::clearDisplay_allDevices()
+{
+ memset(status, (byte)0, 8 * maxDevices);
+ memset(deviceDataBuff, (byte)0, maxDevices);
+ for (int row = 0; row < 8; row++)
+ {
+ spiTransfer_allDevices(row + 1, deviceDataBuff);
+ }
+}
+
void LedControl::setLed(int addr, int row, int column, boolean state) {
int offset;
byte val=0x00;
@@ -138,13 +171,13 @@ void LedControl::setRow(int addr, int row, byte value) {
spiTransfer(addr, row+1,status[offset+row]);
}
-void LedControl::setRowLong(int row, byte *value)
+void LedControl::setRow_allDevices(int row, byte *value)
{
if (row < 0 || row > 7)
return;
for (int addr = 0; addr < maxDevices; addr++)
status[addr * 8 + row] = value[addr];
- spiTransferLong(row + 1, value);
+ spiTransfer_allDevices(row + 1, value);
}
void LedControl::setColumn(int addr, int col, byte value) {
@@ -217,7 +250,7 @@ void LedControl::spiTransfer(int addr, volatile byte opcode, volatile byte data)
digitalWrite(SPI_CS,HIGH);
}
-void LedControl::spiTransferLong(byte opcode, const byte* data) {
+void LedControl::spiTransfer_allDevices(byte opcode, const byte* data) {
//Create an array with the data to shift out
for (int addr = 0; addr < maxDevices; addr++)
{
@@ -227,8 +260,8 @@ void LedControl::spiTransferLong(byte opcode, const byte* data) {
//enable the line
digitalWrite(SPI_CS, LOW);
//Now shift out the data
- for (int i = maxDevices * 2; i > 0; i--)
- shiftOut(SPI_MOSI, SPI_CLK, MSBFIRST, spidata[i - 1]);
+ for (int i = maxDevices * 2 -1; i >= 0; i--)
+ shiftOut(SPI_MOSI, SPI_CLK, MSBFIRST, spidata[i]);
//latch the data onto the display
digitalWrite(SPI_CS, HIGH);
}
diff --git a/lib/lib_display/LedControl/src/LedControl.h b/lib/lib_display/LedControl/src/LedControl.h
index 31fed9ffe..4fc7523df 100644
--- a/lib/lib_display/LedControl/src/LedControl.h
+++ b/lib/lib_display/LedControl/src/LedControl.h
@@ -69,10 +69,11 @@ class LedControl {
/* Send out a single command to one device */
void spiTransfer(int addr, byte opcode, byte data);
/* Send out a command with the same opcode to all devices */
- void spiTransferLong(byte opcode, const byte* data);
+ void spiTransfer_allDevices(byte opcode, const byte* data);
/* We keep track of the led-status for all 8 devices in this array */
byte status[8 * MAX72XX_MAX_DEVICES];
+ byte deviceDataBuff[MAX72XX_MAX_DEVICES];
/* Data is shifted out of this pin*/
int SPI_MOSI;
/* The clock is signaled on this pin */
@@ -108,6 +109,7 @@ class LedControl {
* for normal operation.
*/
void shutdown(int addr, bool status);
+ void shutdown_allDevices( bool status);
/*
* Set the number of digits (or rows) to be displayed.
@@ -118,6 +120,7 @@ class LedControl {
* limit number of digits to be displayed (1..8)
*/
void setScanLimit(int addr, int limit);
+ void setScanLimit_allDevices(int limit);
/*
* Set the brightness of the display.
@@ -126,6 +129,7 @@ class LedControl {
* intensity the brightness of the display. (0..15)
*/
void setIntensity(int addr, int intensity);
+ void setIntensity_allDevices(int intensity);
/*
* Switch all Leds on the display off.
@@ -133,6 +137,7 @@ class LedControl {
* addr address of the display to control
*/
void clearDisplay(int addr);
+ void clearDisplay_allDevices();
/*
* Set the status of a single Led.
@@ -161,7 +166,7 @@ class LedControl {
* @param row [0..8]
* @param value array of bytes, one for each device
*/
- void setRowLong(int row, byte* value);
+ void setRow_allDevices(int row, byte* value);
/*
* Set all 8 Led's in a column to a new state
diff --git a/lib/lib_display/LedControl/src/LedMatrix.cpp b/lib/lib_display/LedControl/src/LedMatrix.cpp
index 1579e0852..59882cd15 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.cpp
+++ b/lib/lib_display/LedControl/src/LedMatrix.cpp
@@ -139,10 +139,7 @@ bool LedMatrix::clearDisplay(void)
bool LedMatrix::setIntensity(byte dim)
{
- for (int addr = 0; addr < modules; addr++)
- {
- ledControl->setIntensity(addr, dim); // 1..15
- }
+ ledControl->setIntensity_allDevices(dim); // 1..15
return true;
}
@@ -183,9 +180,51 @@ bool LedMatrix::setPixel(const int x, const int y, bool on)
void LedMatrix::refresh()
{
- for (int i = 0; i < modulesPerRow * displayHeight; i++)
+ int col = 0;
+ int pixelRow = 0;
+ int bufPos = 0;
+ int deviceRow = 0;
+ for(int ledRow = 7; ledRow >= 0; ledRow--) // refresh from buttom to top
{
- refreshByteOfBuffer(i);
+ for( int addr = 0; addr < modules; addr++)
+ {
+ switch(moduleOrientation)
+ {
+ case ORIENTATION_NORMAL:
+ col = addr % modulesPerRow;
+ pixelRow = (addr / modulesPerRow) * 8 + ledRow;
+ bufPos = pixelRow * modulesPerRow + col;
+ deviceDataBuff[addr] = buffer[bufPos];
+ deviceRow = ledRow;
+ break;
+ case ORIENTATION_UPSIDE_DOWN:
+ col = addr % modulesPerRow;
+ pixelRow = (addr / modulesPerRow) * 8 + deviceRow;
+ bufPos = pixelRow * modulesPerRow + col;
+ deviceDataBuff[addr] = revereBitorder(buffer[bufPos]); // mirror
+ deviceRow = 7 - ledRow; // upside down
+ break;
+ }
+ if(moduleOrientation == ORIENTATION_NORMAL || moduleOrientation == ORIENTATION_UPSIDE_DOWN)
+ {
+ col = addr % modulesPerRow;
+ pixelRow = (addr / modulesPerRow) * 8 + ledRow;
+ bufPos = pixelRow * modulesPerRow + col;
+ if(moduleOrientation == ORIENTATION_NORMAL)
+ {
+ // ORIENTATION_NORMAL
+ deviceDataBuff[addr] = buffer[bufPos];
+ deviceRow = ledRow;
+ }
+ else
+ {
+ // ORIENTATION_UPSIDE_DOWN
+ deviceDataBuff[addr] = revereBitorder(buffer[bufPos]); // mirror
+ deviceRow = 7 - ledRow; // upside down
+ }
+ }
+ }
+ ledControl->setRow_allDevices(deviceRow, deviceDataBuff); // upside down
}
}
@@ -227,10 +266,7 @@ bool LedMatrix::shutdown(bool b)
bool LedMatrix::clear(void)
{
memset(buffer, 0, MATRIX_BUFFER_SIZE);
- for (int addr = 0; addr < modules; addr++)
- {
- ledControl->clearDisplay(addr);
- }
+ ledControl->clearDisplay_allDevices();
return true;
}
diff --git a/lib/lib_display/LedControl/src/LedMatrix.h b/lib/lib_display/LedControl/src/LedMatrix.h
index b369173d0..9fee69a5f 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.h
+++ b/lib/lib_display/LedControl/src/LedMatrix.h
@@ -154,6 +154,7 @@ class LedMatrix
unsigned int modules; // number of 8x8 mudules
uint8_t moduleOrientation;
byte buffer[MATRIX_BUFFER_SIZE];
+ byte deviceDataBuff[MAX72XX_MAX_DEVICES];
LedControl* ledControl;
int charWidth;
int charHeight;
From 306ed0d2dd8040f7f56eaba24a9ea3cf8b0925cc Mon Sep 17 00:00:00 2001
From: Michael
Date: Fri, 3 Dec 2021 16:50:55 +0100
Subject: [PATCH 013/402] max7219 dot matrix ready for pull request
---
lib/lib_display/LedControl/src/LedControl.cpp | 82 ++-------
lib/lib_display/LedControl/src/LedControl.h | 25 +--
lib/lib_display/LedControl/src/LedMatrix.cpp | 173 +++++++++---------
lib/lib_display/LedControl/src/LedMatrix.h | 59 ++++--
tasmota/xdsp_19_max7219_matrix.ino | 20 +-
5 files changed, 162 insertions(+), 197 deletions(-)
diff --git a/lib/lib_display/LedControl/src/LedControl.cpp b/lib/lib_display/LedControl/src/LedControl.cpp
index baaa3802c..5807aa6af 100644
--- a/lib/lib_display/LedControl/src/LedControl.cpp
+++ b/lib/lib_display/LedControl/src/LedControl.cpp
@@ -47,28 +47,26 @@ LedControl::LedControl(int dataPin, int clkPin, int csPin, int numDevices) {
SPI_MOSI=dataPin;
SPI_CLK=clkPin;
SPI_CS=csPin;
- if (numDevices <= 0 || numDevices > MAX72XX_MAX_DEVICES)
- numDevices = MAX72XX_MAX_DEVICES;
+ if(numDevices<=0 || numDevices>8 )
+ numDevices=8;
maxDevices = numDevices;
pinMode(SPI_MOSI,OUTPUT);
pinMode(SPI_CLK,OUTPUT);
pinMode(SPI_CS,OUTPUT);
digitalWrite(SPI_CS,HIGH);
SPI_MOSI=dataPin;
-
- memset(status, (byte)0, 8 * MAX72XX_MAX_DEVICES);
- memset(deviceDataBuff, (byte)0, MAX72XX_MAX_DEVICES);
-
- // display test
- spiTransfer_allDevices(OP_DISPLAYTEST, deviceDataBuff);
+ for(int i=0;i<64;i++)
+ status[i]=0x00;
+ for(int i=0;i=maxDevices)
return;
@@ -96,13 +89,6 @@ void LedControl::setScanLimit(int addr, int limit) {
spiTransfer(addr, OP_SCANLIMIT,limit);
}
-void LedControl::setScanLimit_allDevices(int limit) {
- if(limit <0 || limit>8) return;
-
- memset(deviceDataBuff, (byte)limit, maxDevices);
- spiTransfer_allDevices(OP_SCANLIMIT,deviceDataBuff);
-}
-
void LedControl::setIntensity(int addr, int intensity) {
if(addr<0 || addr>=maxDevices)
return;
@@ -110,15 +96,6 @@ void LedControl::setIntensity(int addr, int intensity) {
spiTransfer(addr, OP_INTENSITY,intensity);
}
-void LedControl::setIntensity_allDevices(int intensity)
-{
- if (intensity < 0 | intensity > 15)
- return;
-
- memset(deviceDataBuff, (byte)intensity, maxDevices);
- spiTransfer_allDevices(OP_INTENSITY, deviceDataBuff);
-}
-
void LedControl::clearDisplay(int addr) {
int offset;
@@ -131,16 +108,6 @@ void LedControl::clearDisplay(int addr) {
}
}
-void LedControl::clearDisplay_allDevices()
-{
- memset(status, (byte)0, 8 * maxDevices);
- memset(deviceDataBuff, (byte)0, maxDevices);
- for (int row = 0; row < 8; row++)
- {
- spiTransfer_allDevices(row + 1, deviceDataBuff);
- }
-}
-
void LedControl::setLed(int addr, int row, int column, boolean state) {
int offset;
byte val=0x00;
@@ -171,15 +138,6 @@ void LedControl::setRow(int addr, int row, byte value) {
spiTransfer(addr, row+1,status[offset+row]);
}
-void LedControl::setRow_allDevices(int row, byte *value)
-{
- if (row < 0 || row > 7)
- return;
- for (int addr = 0; addr < maxDevices; addr++)
- status[addr * 8 + row] = value[addr];
- spiTransfer_allDevices(row + 1, value);
-}
-
void LedControl::setColumn(int addr, int col, byte value) {
byte val;
@@ -237,7 +195,7 @@ void LedControl::spiTransfer(int addr, volatile byte opcode, volatile byte data)
int maxbytes=maxDevices*2;
for(int i=0;i= 0; i--)
- shiftOut(SPI_MOSI, SPI_CLK, MSBFIRST, spidata[i]);
- //latch the data onto the display
- digitalWrite(SPI_CS, HIGH);
-}
+
diff --git a/lib/lib_display/LedControl/src/LedControl.h b/lib/lib_display/LedControl/src/LedControl.h
index 4fc7523df..f8180d07d 100644
--- a/lib/lib_display/LedControl/src/LedControl.h
+++ b/lib/lib_display/LedControl/src/LedControl.h
@@ -35,10 +35,6 @@
#include
#endif
-#ifndef MAX72XX_MAX_DEVICES
-#define MAX72XX_MAX_DEVICES 32 // maximum number of devices based on MXA7219/MAX7221
-#endif
-
/*
* Segments to be switched on for characters and digits on
* 7-Segment Displays
@@ -65,15 +61,12 @@ const static byte charTable [] PROGMEM = {
class LedControl {
private :
/* The array for shifting the data to the devices */
- byte spidata[2 * MAX72XX_MAX_DEVICES];
- /* Send out a single command to one device */
+ byte spidata[16];
+ /* Send out a single command to the device */
void spiTransfer(int addr, byte opcode, byte data);
- /* Send out a command with the same opcode to all devices */
- void spiTransfer_allDevices(byte opcode, const byte* data);
/* We keep track of the led-status for all 8 devices in this array */
- byte status[8 * MAX72XX_MAX_DEVICES];
- byte deviceDataBuff[MAX72XX_MAX_DEVICES];
+ byte status[64];
/* Data is shifted out of this pin*/
int SPI_MOSI;
/* The clock is signaled on this pin */
@@ -109,7 +102,6 @@ class LedControl {
* for normal operation.
*/
void shutdown(int addr, bool status);
- void shutdown_allDevices( bool status);
/*
* Set the number of digits (or rows) to be displayed.
@@ -120,7 +112,6 @@ class LedControl {
* limit number of digits to be displayed (1..8)
*/
void setScanLimit(int addr, int limit);
- void setScanLimit_allDevices(int limit);
/*
* Set the brightness of the display.
@@ -129,7 +120,6 @@ class LedControl {
* intensity the brightness of the display. (0..15)
*/
void setIntensity(int addr, int intensity);
- void setIntensity_allDevices(int intensity);
/*
* Switch all Leds on the display off.
@@ -137,7 +127,6 @@ class LedControl {
* addr address of the display to control
*/
void clearDisplay(int addr);
- void clearDisplay_allDevices();
/*
* Set the status of a single Led.
@@ -160,14 +149,6 @@ class LedControl {
*/
void setRow(int addr, int row, byte value);
- /**
- * @brief Set data for the same row of all devices
- *
- * @param row [0..8]
- * @param value array of bytes, one for each device
- */
- void setRow_allDevices(int row, byte* value);
-
/*
* Set all 8 Led's in a column to a new state
* Params:
diff --git a/lib/lib_display/LedControl/src/LedMatrix.cpp b/lib/lib_display/LedControl/src/LedMatrix.cpp
index 59882cd15..929a09418 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.cpp
+++ b/lib/lib_display/LedControl/src/LedMatrix.cpp
@@ -1,5 +1,5 @@
/*
- * LedMatrix.h - Extends the Library LedControl for multiple 8x8 LED dot matrix modules, based on MAX7219/MAX7221
+ * LedMatrix.h - Extends the Library LedControl for multiple 8x8 LED dot matrix maxDevices, based on MAX7219/MAX7221
* Copyright (c) 2021 Michael Beuss
*
* Permission is hereby granted, free of charge, to any person
@@ -29,7 +29,26 @@
#include "font_6x8_horizontal_MSB.h"
//#include "font_8x8_horizontal_latin_MSB.h"
-// public
+//the opcodes for the MAX7221 and MAX7219
+#define OP_NOOP 0
+#define OP_DIGIT0 1
+#define OP_DIGIT1 2
+#define OP_DIGIT2 3
+#define OP_DIGIT3 4
+#define OP_DIGIT4 5
+#define OP_DIGIT5 6
+#define OP_DIGIT6 7
+#define OP_DIGIT7 8
+#define OP_DECODEMODE 9
+#define OP_INTENSITY 10
+#define OP_SCANLIMIT 11
+#define OP_SHUTDOWN 12
+#define OP_DISPLAYTEST 15
+
+// test
+#include "LedControl.h"
+LedControl* ledControl = nullptr;
+// end text
LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows)
{
if (colums * rows > MAX72XX_MAX_DEVICES)
@@ -52,22 +71,36 @@ LedMatrix::LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, un
modulesPerCol = rows;
displayWidth = colums * 8;
displayHeight = rows * 8;
- modules = colums * rows;
+ maxDevices = colums * rows;
moduleOrientation = ORIENTATION_UPSIDE_DOWN; // use setOrientation() to turn it
- ledControl = new LedControl(dataPin, clkPin, csPin, modules); // initializes all connected LED matrix modules
textBuf[0] = 0;
textWidth = 0;
textPosX = 0;
textPosY = 0;
appendTextBuf[0] = 0;
setScrollAppendText(" ");
- shutdown(false); // false: on, true: off
- clear();
- setIntensity(7);
+
+ // initialize all connected MAX7219/MAX7221 devices
+ SPI_MOSI = dataPin;
+ SPI_CLK = clkPin;
+ SPI_CS = csPin;
+ pinMode(SPI_MOSI, OUTPUT);
+ pinMode(SPI_CLK, OUTPUT);
+ pinMode(SPI_CS, OUTPUT);
+ SPI_MOSI = dataPin;
+
+ //spiTransfer_value(OP_DISPLAYTEST, 0); // display test
+ spiTransfer_value(OP_SCANLIMIT, 7); // scanlimit is set to max on startup
+ spiTransfer_value(OP_DECODEMODE, 0); // decode is done in source
+ clearDisplay();
+ //spiTransfer_value(OP_SHUTDOWN, 0); //we go into shutdown-mode (LEDs off) on startup
+ setIntensity(7); // initialize with the half of the maximum intensity [0..15]
+ power(true); // power on;
}
bool LedMatrix::drawText( const char *str, bool clearBefore)
{
+ if(clearBefore) clearDisplay();
strncpy(textBuf, str, TEXT_BUFFER_SIZE -1);
textPosX = 0;
textPosY = 0;
@@ -75,7 +108,6 @@ bool LedMatrix::drawText( const char *str, bool clearBefore)
if(textWidth < displayWidth)
{
// text fits into the display, place it into the center
- if(clearBefore) clear();
textPosX = (displayWidth - textWidth) / 2; // center
}
else
@@ -125,21 +157,29 @@ bool LedMatrix::scrollText()
void LedMatrix::power(bool on)
{
- shutdown(!on); // power(false) shuts down the display with shutdown(true)
+ byte value = 0; // 0: shutdown
+ if(on) value = 1; // 1: power on
+ spiTransfer_value(OP_SHUTDOWN, value); // power(false) shuts down the display
}
bool LedMatrix::clearDisplay(void)
{
- textBuf[0] = 0;
memset(textBuf, 0, TEXT_BUFFER_SIZE);
textWidth = 0;
- clear();
+ memset(buffer, 0, MATRIX_BUFFER_SIZE);
+ for (int row = 0; row < 8; row++)
+ {
+ spiTransfer_value(row + 1, 0);
+ }
return true;
}
-bool LedMatrix::setIntensity(byte dim)
+bool LedMatrix::setIntensity(byte intensity)
{
- ledControl->setIntensity_allDevices(dim); // 1..15
+ if (intensity < 0 || intensity > 15)
+ return false;
+
+ spiTransfer_value(OP_INTENSITY, intensity);
return true;
}
@@ -186,25 +226,8 @@ void LedMatrix::refresh()
int deviceRow = 0;
for(int ledRow = 7; ledRow >= 0; ledRow--) // refresh from buttom to top
{
- for( int addr = 0; addr < modules; addr++)
+ for( int addr = 0; addr < maxDevices; addr++)
{
- switch(moduleOrientation)
- {
- case ORIENTATION_NORMAL:
- col = addr % modulesPerRow;
- pixelRow = (addr / modulesPerRow) * 8 + ledRow;
- bufPos = pixelRow * modulesPerRow + col;
- deviceDataBuff[addr] = buffer[bufPos];
- deviceRow = ledRow;
- break;
- case ORIENTATION_UPSIDE_DOWN:
- col = addr % modulesPerRow;
- pixelRow = (addr / modulesPerRow) * 8 + deviceRow;
- bufPos = pixelRow * modulesPerRow + col;
- deviceDataBuff[addr] = revereBitorder(buffer[bufPos]); // mirror
- deviceRow = 7 - ledRow; // upside down
- break;
- }
if(moduleOrientation == ORIENTATION_NORMAL || moduleOrientation == ORIENTATION_UPSIDE_DOWN)
{
col = addr % modulesPerRow;
@@ -224,7 +247,7 @@ void LedMatrix::refresh()
}
}
}
- ledControl->setRow_allDevices(deviceRow, deviceDataBuff); // upside down
+ setRow_allDevices(deviceRow, deviceDataBuff);
}
}
@@ -254,58 +277,6 @@ bool LedMatrix::drawCharAt( char c, const int x, const int y)
return true;
}
-bool LedMatrix::shutdown(bool b)
-{
- for (int addr = 0; addr < modules; addr++)
- {
- ledControl->shutdown(addr, b); // b: false: on, true: off
- }
- return true;
-}
-
-bool LedMatrix::clear(void)
-{
- memset(buffer, 0, MATRIX_BUFFER_SIZE);
- ledControl->clearDisplay_allDevices();
- return true;
-}
-
-void LedMatrix::refreshByteOfBuffer(int i)
-{
- int line = i / modulesPerRow;
- int addr = (line / 8) * modulesPerRow + i % modulesPerRow;
- byte b = buffer[i];
- if (moduleOrientation == ORIENTATION_NORMAL || moduleOrientation == ORIENTATION_UPSIDE_DOWN)
- {
- int rowOfAddr = 0;
- if (moduleOrientation == ORIENTATION_NORMAL)
- {
- rowOfAddr = line % 8; // ORIENTATION_NORMAL
- }
- else
- {
- rowOfAddr = 7 - line % 8; // ORIENTATION_UPSIDE_DOWN
- b = revereBitorder(b);
- }
- ledControl->setRow(addr, rowOfAddr, b);
- }
- else
- {
- // ORIENTATION_TURN_RIGHT or ORIENTATION_TURN_LEFT
- int colOfAddr = 0;
- if (moduleOrientation == ORIENTATION_TURN_LEFT)
- {
- colOfAddr = line % 8; // ORIENTATION_TURN_LEFT
- }
- else
- {
- colOfAddr = 7 - line % 8; // ORIENTATION_TURN_RIGHT
- b = revereBitorder(b);
- }
- ledControl->setColumn(addr, colOfAddr, b);
- }
-}
-
byte LedMatrix::revereBitorder (byte b)
{
static const byte lookup[16] = {
@@ -320,3 +291,37 @@ void LedMatrix::appendSpace()
strncat(textBuf, appendTextBuf, TEXT_BUFFER_SIZE -1);
textWidth = strlen(textBuf) * charWidth;
}
+
+void LedMatrix::setRow_allDevices(int row, byte *data)
+{
+ if (row < 0 || row > 7)
+ return;
+ spiTransfer_array(row + 1, data);
+}
+
+void LedMatrix::spiTransfer_array(byte opcode, const byte* data) {
+ // create an array with the data to shift out
+ for (int addr = 0; addr < maxDevices; addr++)
+ {
+ spidata[addr * 2 + 1] = opcode;
+ spidata[addr * 2] = data[addr];
+ }
+ // enable the line
+ digitalWrite(SPI_CS, LOW);
+ // shift out the data
+ for (int i = maxDevices * 2 -1; i >= 0; i--)
+ {
+ shiftOut(SPI_MOSI, SPI_CLK, MSBFIRST, spidata[i]);
+ }
+ // latch the data onto the display
+ digitalWrite(SPI_CS, HIGH);
+}
+
+void LedMatrix::spiTransfer_value(byte opcode, byte value)
+{
+ memset(deviceDataBuff, (byte)value, maxDevices);
+ spiTransfer_array(opcode, deviceDataBuff);
+}
+
+
+
diff --git a/lib/lib_display/LedControl/src/LedMatrix.h b/lib/lib_display/LedControl/src/LedMatrix.h
index 9fee69a5f..aec15d052 100644
--- a/lib/lib_display/LedControl/src/LedMatrix.h
+++ b/lib/lib_display/LedControl/src/LedMatrix.h
@@ -1,5 +1,5 @@
/*
- * LedMatrix.h - Extends the Library LedControl for multiple 8x8 LED dot matrix modules, based on MAX7219/MAX7221
+ * LedMatrix.h - Extends the Library LedControl for multiple 8x8 LED dot matrix devices, based on MAX7219/MAX7221
* Copyright (c) 2021 Michael Beuss
*
* Permission is hereby granted, free of charge, to any person
@@ -27,16 +27,27 @@
#ifndef LedMatrix_h
#define LedMatrix_h
-#include
+#include
+
+#if (ARDUINO >= 100)
+#include
+#else
+#include
+#endif
+
+#ifndef MAX72XX_MAX_DEVICES
+#define MAX72XX_MAX_DEVICES 32 // maximum number of devices based on MXA7219/MAX7221
+#endif
#define MATRIX_BUFFER_SIZE MAX72XX_MAX_DEVICES * 8 // 8 bytes per modul. One byte represents 8 LEDs.
#define TEXT_BUFFER_SIZE 256 // maximum text length that can be scrolled
#define TEXT_APPEND_BUFFER_SIZE 16 // used for characters that are appended to the scroll text, before it repeats
+#define SPI_BUFFER_SIZE MAX72XX_MAX_DEVICES * 2 // buffer size fort shifting commands to all devices (2 bytes each)
/**
- * @brief LedMatric controls multiple 8x8 LED dot matrx modules.
- * All modules in rows and clolums together build a common display pixel matrix.
+ * @brief LedMatrix controls multiple 8x8 LED dot matrx devices.
+ * All devices in rows and clolums together build a common display pixel matrix.
*
*/
class LedMatrix
@@ -54,8 +65,8 @@ class LedMatrix
/**
* @brief Construct a new LED Matrix object
*
- * @param colums of 8x8 LED dot matrix modules
- * @param rows of 8x8 LED dot matrix modules
+ * @param colums of 8x8 LED dot matrix devices
+ * @param rows of 8x8 LED dot matrix devices
*/
LedMatrix(int dataPin, int clkPin, int csPin, unsigned int colums, unsigned int rows);
@@ -139,23 +150,48 @@ class LedMatrix
void refresh();
private:
+
bool drawCharAt( char c, int x, int y ); // Draws a character to a defined position
- bool shutdown(bool b); // shutdown(true) switches the display off. Text and pixels can be set while it is off. shutdown(false) switches the display on.
- bool clear(void); // clears the display content
- void refreshByteOfBuffer( int i); // sends one byte of the buffer to the display. This updates an 8 pixel row of one matrix module.
byte revereBitorder(byte b); // returnes the byte in the reverse bit order.
void appendSpace(); // appends characters to the end of the text to get a distance to the repeating scroll text
+ // device contrl MAX7219/MAX7221
+ /**
+ * @brief Set data for the same row of all devices
+ *
+ * @param row [0..8]
+ * @param value array of bytes, one for each device
+ */
+ void setRow_allDevices(int row, byte* value);
+
+ /* Send out a command with the same opcode to all devices */
+ /**
+ * @brief sends opcode with specific data values to each device
+ *
+ * @param opcode
+ * @param data array of byte values (data[0] is the value for the first device)
+ */
+ void spiTransfer_array(byte opcode, const byte* data);
+
+ /**
+ * @brief sends opcode with same value to all devices
+ */
+ void spiTransfer_value(byte opcode, byte value);
+
+
private:
+ int SPI_MOSI; // Data is shifted out of this pin
+ int SPI_CLK; // The clock is signaled on this pin
+ int SPI_CS; // This one is driven LOW for chip selectzion
+
unsigned int modulesPerRow;
unsigned int modulesPerCol;
unsigned int displayWidth; // matrix width [pixel]
unsigned int displayHeight; // matrix height [pixel]
- unsigned int modules; // number of 8x8 mudules
+ int maxDevices; // number of used 8x8 devices
uint8_t moduleOrientation;
byte buffer[MATRIX_BUFFER_SIZE];
byte deviceDataBuff[MAX72XX_MAX_DEVICES];
- LedControl* ledControl;
int charWidth;
int charHeight;
char textBuf[TEXT_BUFFER_SIZE];
@@ -163,6 +199,7 @@ class LedMatrix
int textWidth; // width of text [pixel]
int textPosX; // horizontal pixel position of scrolling text
int textPosY; // vertical pixelposition of scrolling text;
+ byte spidata[SPI_BUFFER_SIZE]; // The array for shifting the data to the devices
};
diff --git a/tasmota/xdsp_19_max7219_matrix.ino b/tasmota/xdsp_19_max7219_matrix.ino
index 82a4a24bb..ecf500670 100644
--- a/tasmota/xdsp_19_max7219_matrix.ino
+++ b/tasmota/xdsp_19_max7219_matrix.ino
@@ -128,13 +128,6 @@ bool MAX7291Matrix_initDriver(void)
Settings->display_rows = LedMatrix_settings.modulesPerCol;
Settings->display_cols[1] = LedMatrix_settings.modulesPerCol;
max7219_Matrix = new LedMatrix(Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), LedMatrix_settings.modulesPerRow, LedMatrix_settings.modulesPerCol);
- if( LedMatrix_settings.show_clock == 0)
- {
- Settings->display_mode = 0; // text mode
- }
- else{
- Settings->display_mode = 1; // clock mode
- }
max2791Matrix_initDriver_done = true;
AddLog(LOG_LEVEL_INFO, PSTR("MTX: MAX7291Matrix_initDriver DIN:%d CLK:%d CS:%d size(%dx%d)"), Pin(GPIO_MAX7219DIN), Pin(GPIO_MAX7219CLK), Pin(GPIO_MAX7219CS), LedMatrix_settings.modulesPerRow, LedMatrix_settings.modulesPerCol);
@@ -144,8 +137,13 @@ bool MAX7291Matrix_initDriver(void)
// FUNC_DISPLAY_INIT
bool MAX7291Matrix_init(void)
{
+ Settings->display_mode = 0; // text mode
+ LedMatrix_settings.show_clock = 0; // no clock
+
int intensity = GetDisplayDimmer16(); // 0..15
max7219_Matrix->setIntensity(intensity);
+
+ max7219_Matrix->power(true); // power on
if(Settings->display_rotate <= 3)
{
max7219_Matrix->setOrientation((LedMatrix::ModuleOrientation)Settings->display_rotate );
@@ -223,6 +221,8 @@ bool MAX7291Matrix_clock(void)
Settings->display_mode = 1;
break;
default:
+ //LedMatrix_settings.timeFormat = XdrvMailbox.payload;
+ //Settings->display_mode = 1;
return false;
}
@@ -280,13 +280,11 @@ bool Xdsp19(uint8_t function)
case FUNC_DISPLAY_DRAW_STRING:
case FUNC_DISPLAY_SCROLLTEXT:
case FUNC_DISPLAY_SEVENSEG_TEXT:
- Settings->display_mode = 0; // text mode
- LedMatrix_settings.show_clock = 0; // disable clock mode
+ if(Settings->display_mode != 0) MAX7291Matrix_init();
result = max7219_Matrix->drawText(XdrvMailbox.data, true); // true: clears display before drawing text
break;
case FUNC_DISPLAY_SEVENSEG_TEXTNC:
- Settings->display_mode = 0; // text mode
- LedMatrix_settings.show_clock = 0; // disable clock mode
+ if(Settings->display_mode != 0) MAX7291Matrix_init();
result = max7219_Matrix->drawText(XdrvMailbox.data, false); // false: does not clear display before drawing text
break;
case FUNC_DISPLAY_SCROLLDELAY:
From 3bb71f154d91f51487897c3dfaa120768253d080 Mon Sep 17 00:00:00 2001
From: Jeroen Vermeulen - MageHost
Date: Sat, 11 Dec 2021 19:34:17 +0100
Subject: [PATCH 014/402] Fix for #14006. Without USE_UFILESYS you can't draw
picture buttons.
---
.../Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp b/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp
index 5e88150cc..398dba0df 100644
--- a/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp
+++ b/lib/lib_display/Adafruit-GFX-Library-1.5.6-gemu-1.0/Adafruit_GFX.cpp
@@ -1610,10 +1610,12 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) {
text = _fillcolor;
}
+ #if defined USE_UFILESYS
if (_label[0]=='/') {
draw_picture(_label, _x1, _y1, _w, _h, outline, inverted);
_gfx->drawRect(_x1, _y1, _w, _h, text);
} else {
+ #endif
uint8_t r = min(_w, _h) / 4; // Corner radius
_gfx->fillRoundRect(_x1, _y1, _w, _h, r, fill);
_gfx->drawRoundRect(_x1, _y1, _w, _h, r, outline);
@@ -1622,7 +1624,9 @@ void Adafruit_GFX_Button::drawButton(boolean inverted) {
_gfx->setTextColor(text);
_gfx->setTextSize(_textsize_x, _textsize_y);
_gfx->print(_label);
+ #if defined USE_UFILESYS
}
+ #endif
}
/**************************************************************************/
From 45aeaede9ac9d37bb5b3d5696bd41d5b35052e50 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov
Date: Sun, 12 Dec 2021 08:59:52 +0300
Subject: [PATCH 015/402] Add blor command + bug fixes
---
tasmota/xsns_69_opentherm.ino | 2 --
tasmota/xsns_69_opentherm_protocol.ino | 18 +++++++++---------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/tasmota/xsns_69_opentherm.ino b/tasmota/xsns_69_opentherm.ino
index c94e61b59..38c1ae2c9 100644
--- a/tasmota/xsns_69_opentherm.ino
+++ b/tasmota/xsns_69_opentherm.ino
@@ -16,8 +16,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#define USE_OPENTHERM
-
#ifdef USE_OPENTHERM
#define XSNS_69 69
diff --git a/tasmota/xsns_69_opentherm_protocol.ino b/tasmota/xsns_69_opentherm_protocol.ino
index a86648849..68430d94a 100644
--- a/tasmota/xsns_69_opentherm_protocol.ino
+++ b/tasmota/xsns_69_opentherm_protocol.ino
@@ -16,8 +16,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
-#define USE_OPENTHERM
-
#ifdef USE_OPENTHERM
#include "OpenTherm.h"
@@ -33,6 +31,7 @@ typedef union {
uint8_t notSupported : 1; // If set, boiler does not support this command
uint8_t supported : 1; // Set if at least one response were successfull
uint8_t retryCount : 2; // Retry counter before notSupported flag being set
+ uint8_t manual : 1; // Only manual call
};
} OpenThermParamFlags;
@@ -247,7 +246,7 @@ OpenThermCommand sns_opentherm_commands[] = {
{// Boiler Lock-out Reset command
.m_command_name = "BLOR",
.m_command_code = (uint8_t)OpenThermMessageID::Command,
- .m_flags = {.notSupported = 1},
+ .m_flags = {.manual = 1},
.m_results = {{.m_u8 = 0}, {.m_u8 = 0}},
.m_ot_make_request = sns_opentherm_send_blor,
.m_ot_parse_response = sns_opentherm_parse_generic_u16,
@@ -443,21 +442,21 @@ void sns_opentherm_tele_oem_diag(struct OpenThermCommandT *self)
/////////////////////////////////// Boiler Boiler Lock-out Reset //////////////////////////////////////////////////
unsigned long sns_opentherm_send_blor(struct OpenThermCommandT *self, struct OT_BOILER_STATUS_T *status)
{
- AddLog(LOG_LEVEL_ERROR, PSTR("[OTH]: Boiler Boiler Lock-out Reset"));
+ AddLog(LOG_LEVEL_ERROR, PSTR("[OTH]: Call Boiler Lock-out Reset"));
self->m_flags.notSupported = true; // Disable future calls of this command
unsigned int data = 1; //1 : “BLOR”= Boiler Lock-out Reset command
- return OpenTherm::buildRequest(OpenThermMessageType::WRITE_DATA, OpenThermMessageID::Command, data);
+ data <<= 8;
+ return OpenTherm::buildRequest(OpenThermMessageType::OPTH_WRITE_DATA, OpenThermMessageID::Command, data);
}
+
bool sns_opentherm_call_blor()
{
- /*
- OpenThermCommandT *cmd = &sns_opentherm_commands[sns_opentherm_current_command-1];
+ OpenThermCommandT *cmd = &sns_opentherm_commands[(sizeof(sns_opentherm_commands) / sizeof(OpenThermCommand))-1];
if (strcmp(cmd->m_command_name, "BLOR")) return false;
cmd->m_flags.notSupported = false;
return true;
- */
}
/////////////////////////////////// Generic Single Float /////////////////////////////////////////////////
@@ -597,7 +596,8 @@ void sns_opentherm_protocol_reset()
for (int i = 0; i < SNS_OT_COMMANDS_COUNT; ++i)
{
struct OpenThermCommandT *cmd = &sns_opentherm_commands[i];
- cmd->m_flags.m_flags = 0;
+ cmd->m_flags.notSupported = cmd->m_flags.manual;
+ cmd->m_flags.retryCount = 0;
memset(cmd->m_results, 0, sizeof(OpenThermCommandT::m_results));
}
}
From 801c0cf90f892fd2fa5403ad2c55260b36431767 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:09:20 +0100
Subject: [PATCH 016/402] Use matrix for compile
---
.github/workflows/Tasmota_build_devel.yml | 1370 +--------------------
1 file changed, 60 insertions(+), 1310 deletions(-)
diff --git a/.github/workflows/Tasmota_build_devel.yml b/.github/workflows/Tasmota_build_devel.yml
index fe3f995d1..bf22b6313 100644
--- a/.github/workflows/Tasmota_build_devel.yml
+++ b/.github/workflows/Tasmota_build_devel.yml
@@ -9,1318 +9,68 @@ on:
- '**.md' # Do no build if *.md files changes
jobs:
-
- tasmota:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-minimal:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-minimal
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-lite:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-lite
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-knx:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-knx
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-sensors:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-sensors
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-display:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-display
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-ir:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-ir
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-zbbridge:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-zbbridge
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-zigbee:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-zigbee
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-AF:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-AF
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-BG:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-BG
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-BR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-BR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-CN:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-CN
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-CZ:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-CZ
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-DE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-DE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-ES:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-ES
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-FR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-FR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-FY:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-FY
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-GR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-GR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-HE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-HE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-HU:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-HU
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-IT:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-IT
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-KO:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-KO
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-NL:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-NL
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-PL:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-PL
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-PT:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-PT
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-RO:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-RO
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-RU:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-RU
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-SE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-SE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-SK:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-SK
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-TR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-TR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-TW:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-TW
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-UK:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-UK
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-VN:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-VN
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32solo1:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32solo1
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-webcam:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-webcam
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-odroidgo:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-odroidgo
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-core2:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-core2
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-bluetooth:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-bluetooth
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-display:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-display
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-lvgl:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-lvgl
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-ir:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-ir
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
- tasmota32c3:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32c3
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
- tasmota32-AF:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-AF
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-BG:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-BG
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-BR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-BR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-CN:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-CN
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-CZ:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-CZ
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-DE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-DE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-ES:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-ES
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-FR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-FR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-FY:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-FY
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-GR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-GR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-HE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-HE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-HU:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-HU
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-IT:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-IT
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-KO:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-KO
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-NL:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-NL
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-PL:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-PL
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-PT:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-PT
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-RO:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-RO
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-RU:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-RU
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-SE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-SE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-SK:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-SK
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-TR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-TR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-TW:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-TW
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-UK:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-UK
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-VN:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-VN
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
+ base-images:
+ runs-on: ubuntu-latest
+ continue-on-error: true
+ strategy:
+ matrix:
+ variant:
+ - tasmota
+ - tasmota-minimal
+ - tasmota-display
+ - tasmota-ir
+ - tasmota-knx
+ - tasmota-lite
+ - tasmota-sensors
+ - tasmota-zbbridge
+ - tasmota-zigbee
+ - tasmota32
+ - tasmota32-webcam
+ - tasmota32-bluetooth
+ - tasmota32-core2
+ - tasmota32-display
+ - tasmota32-ir
+ - tasmota32-lvgl
+ - tasmota32-odroidgo
+ - tasmota32c3
+ - tasmota32solo1
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ - name: Install dependencies
+ run: |
+ pip install -U platformio
+ - name: Run PlatformIO
+ run: platformio run -e ${{ matrix.variant }}
+ - uses: actions/upload-artifact@v2
+ with:
+ name: firmware
+ path: ./build_output
+
+ language-images:
+ runs-on: ubuntu-latest
+ continue-on-error: true
+ strategy:
+ matrix:
+ variant: [ tasmota, tasmota32 ]
+ language: [ AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ - name: Install dependencies
+ run: |
+ pip install -U platformio
+ - name: Run PlatformIO
+ run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
+ - uses: actions/upload-artifact@v2
+ with:
+ name: firmware
+ path: ./build_output
Upload:
- needs: [tasmota-VN, tasmota32-VN, tasmota32-TW, tasmota32-TR]
+ needs: [base-images, language-images]
runs-on: ubuntu-latest
continue-on-error: true
steps:
From 9ff3755798be1372d19803ad48614d0cdae75085 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:15:43 +0100
Subject: [PATCH 017/402] Use matrix to build
---
.github/workflows/Tasmota_build_master.yml | 1371 +-------------------
1 file changed, 61 insertions(+), 1310 deletions(-)
diff --git a/.github/workflows/Tasmota_build_master.yml b/.github/workflows/Tasmota_build_master.yml
index 4639fde5e..41661c136 100644
--- a/.github/workflows/Tasmota_build_master.yml
+++ b/.github/workflows/Tasmota_build_master.yml
@@ -5,1320 +5,71 @@ on:
branches: master
paths-ignore:
- '.github/**' # Ignore changes towards the .github directory
+ - '**.md' # Do no build if *.md files changes
jobs:
-
- tasmota:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-minimal:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-minimal
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-lite:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-lite
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-knx:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-knx
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-sensors:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-sensors
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-display:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-display
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-ir:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-ir
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-zbbridge:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-zbbridge
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-zigbee:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-zigbee
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-AF:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-AF
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-BG:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-BG
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-BR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-BR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-CN:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-CN
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-CZ:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-CZ
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-DE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-DE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-ES:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-ES
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-FR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-FR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-FY:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-FY
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-GR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-GR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-HE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-HE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-HU:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-HU
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-IT:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-IT
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-KO:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-KO
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-NL:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-NL
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-PL:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-PL
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-PT:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-PT
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-RO:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-RO
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-RU:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-RU
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-SE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-SE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-SK:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-SK
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-TR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-TR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-TW:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-TW
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-UK:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-UK
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota-VN:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota-VN
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32solo1:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32solo1
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-webcam:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-webcam
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-odroidgo:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-odroidgo
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-core2:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-core2
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-bluetooth:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-bluetooth
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-display:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-display
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-lvgl:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-lvgl
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-ir:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-ir
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
- tasmota32c3:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32c3
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
- tasmota32-AF:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-AF
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-BG:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-BG
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-BR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-BR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-CN:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-CN
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-CZ:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-CZ
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-DE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-DE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-ES:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-ES
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-FR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-FR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-FY:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-FY
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-GR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-GR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-HE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-HE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-HU:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-HU
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-IT:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-IT
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-KO:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-KO
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-NL:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-NL
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-PL:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-PL
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-PT:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-PT
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-RO:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-RO
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-RU:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-RU
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-SE:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-SE
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-SK:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-SK
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-TR:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-TR
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-TW:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-TW
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-UK:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-UK
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
-
- tasmota32-VN:
- runs-on: ubuntu-latest
- continue-on-error: true
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v1
- - name: Install dependencies
- run: |
- pip install -U platformio
- - name: Run PlatformIO
- run: |
- platformio run -e tasmota32-VN
- - uses: actions/upload-artifact@v2
- with:
- name: firmware
- path: ./build_output
-
+ base-images:
+ runs-on: ubuntu-latest
+ continue-on-error: true
+ strategy:
+ matrix:
+ variant:
+ - tasmota
+ - tasmota-minimal
+ - tasmota-display
+ - tasmota-ir
+ - tasmota-knx
+ - tasmota-lite
+ - tasmota-sensors
+ - tasmota-zbbridge
+ - tasmota-zigbee
+ - tasmota32
+ - tasmota32-webcam
+ - tasmota32-bluetooth
+ - tasmota32-core2
+ - tasmota32-display
+ - tasmota32-ir
+ - tasmota32-lvgl
+ - tasmota32-odroidgo
+ - tasmota32c3
+ - tasmota32solo1
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ - name: Install dependencies
+ run: |
+ pip install -U platformio
+ - name: Run PlatformIO
+ run: platformio run -e ${{ matrix.variant }}
+ - uses: actions/upload-artifact@v2
+ with:
+ name: firmware
+ path: ./build_output
+
+ language-images:
+ runs-on: ubuntu-latest
+ continue-on-error: true
+ strategy:
+ matrix:
+ variant: [ tasmota, tasmota32 ]
+ language: [ AF, BG, BR, CN, CZ, DE, ES, FR, FY, GR, HE, HU, IT, KO, NL, PL, PT, RO, RU, SE, SK, TR, TW, UK, VN ]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ - name: Install dependencies
+ run: |
+ pip install -U platformio
+ - name: Run PlatformIO
+ run: platformio run -e ${{ matrix.variant }}-${{ matrix.language }}
+ - uses: actions/upload-artifact@v2
+ with:
+ name: firmware
+ path: ./build_output
Upload:
- needs: [tasmota-VN, tasmota32-VN, tasmota32-TW, tasmota32-TR]
+ needs: [base-images, language-images]
runs-on: ubuntu-latest
continue-on-error: true
steps:
From 806d87b3a9288cfa964905e117abdd50d7f18c20 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:20:16 +0100
Subject: [PATCH 018/402] run github build only in repo arendst
---
.github/workflows/Tasmota_build_devel.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/Tasmota_build_devel.yml b/.github/workflows/Tasmota_build_devel.yml
index bf22b6313..ac908be23 100644
--- a/.github/workflows/Tasmota_build_devel.yml
+++ b/.github/workflows/Tasmota_build_devel.yml
@@ -11,6 +11,7 @@ on:
jobs:
base-images:
runs-on: ubuntu-latest
+ if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
@@ -50,6 +51,7 @@ jobs:
language-images:
runs-on: ubuntu-latest
+ if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
From 58499b18dbd1ef30532c9d63fdb58d48416abd78 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:21:31 +0100
Subject: [PATCH 019/402] build firmware only in repo arendst
---
.github/workflows/Tasmota_build_master.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/Tasmota_build_master.yml b/.github/workflows/Tasmota_build_master.yml
index 41661c136..9ae940bef 100644
--- a/.github/workflows/Tasmota_build_master.yml
+++ b/.github/workflows/Tasmota_build_master.yml
@@ -10,6 +10,7 @@ on:
jobs:
base-images:
runs-on: ubuntu-latest
+ if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
@@ -49,6 +50,7 @@ jobs:
language-images:
runs-on: ubuntu-latest
+ if: github.repository == 'arendst/Tasmota'
continue-on-error: true
strategy:
matrix:
From 21cda658d66f255887787eba526eb39ad5216cf3 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Sun, 12 Dec 2021 17:22:37 +0100
Subject: [PATCH 020/402] CI only in arendst repo
---
.github/workflows/build_all_the_things.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/build_all_the_things.yml b/.github/workflows/build_all_the_things.yml
index 2ffca53b7..cb41ae85e 100644
--- a/.github/workflows/build_all_the_things.yml
+++ b/.github/workflows/build_all_the_things.yml
@@ -18,6 +18,7 @@ on:
jobs:
base-images:
runs-on: ubuntu-latest
+ if: github.repository == 'arendst/Tasmota'
strategy:
matrix:
variant:
@@ -59,6 +60,7 @@ jobs:
language-images:
runs-on: ubuntu-latest
+ if: github.repository == 'arendst/Tasmota'
strategy:
matrix:
variant: [ tasmota ]
From fa7b0302a7c42fdf1e76bdfb39605f0071e02b78 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Sun, 12 Dec 2021 18:04:46 +0100
Subject: [PATCH 021/402] Trying to solve ESP32-webcam timeouts
Trying to solve ESP32-webcam timeouts on Settings save by adding delays in between file write chunks and diabling NVS writes when stream is active. (#13882)
---
tasmota/settings.ino | 2 +-
tasmota/support_esp.ino | 51 +++++++++++++++++++-------------
tasmota/xdrv_50_filesystem.ino | 18 ++++++++++-
tasmota/xdrv_81_esp32_webcam.ino | 4 +++
4 files changed, 53 insertions(+), 22 deletions(-)
diff --git a/tasmota/settings.ino b/tasmota/settings.ino
index 31dd8a87c..5dfc21424 100644
--- a/tasmota/settings.ino
+++ b/tasmota/settings.ino
@@ -694,7 +694,7 @@ void SettingsLoad(void) {
if (source) {
settings_location = 1;
if (Settings->cfg_holder == (uint16_t)CFG_HOLDER) {
- AddLog(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG "Loaded from %s, " D_COUNT " %lu"), (source)?"File":"Nvm", Settings->save_flag);
+ AddLog(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG "Loaded from %s, " D_COUNT " %lu"), (2 == source)?"File":"NVS", Settings->save_flag);
}
}
#endif // ESP32
diff --git a/tasmota/support_esp.ino b/tasmota/support_esp.ino
index 93abe9daa..81b6ee6f6 100644
--- a/tasmota/support_esp.ino
+++ b/tasmota/support_esp.ino
@@ -137,34 +137,43 @@ String GetDeviceHardware(void) {
#include
-void NvmLoad(const char *sNvsName, const char *sName, void *pSettings, unsigned nSettingsLen) {
- nvs_handle handle;
- noInterrupts();
- nvs_open(sNvsName, NVS_READONLY, &handle);
+bool NvmLoad(const char *sNvsName, const char *sName, void *pSettings, unsigned nSettingsLen) {
+ nvs_handle_t handle;
+// noInterrupts();
+ esp_err_t result = nvs_open(sNvsName, NVS_READONLY, &handle);
+ if (result != ESP_OK) {
+ AddLog(LOG_LEVEL_DEBUG, PSTR("NVS: Error %d"), result);
+ return false;
+ }
size_t size = nSettingsLen;
nvs_get_blob(handle, sName, pSettings, &size);
nvs_close(handle);
- interrupts();
+// interrupts();
+ return true;
}
void NvmSave(const char *sNvsName, const char *sName, const void *pSettings, unsigned nSettingsLen) {
- nvs_handle handle;
- noInterrupts();
- nvs_open(sNvsName, NVS_READWRITE, &handle);
+ nvs_handle_t handle;
+// noInterrupts();
+ esp_err_t result = nvs_open(sNvsName, NVS_READWRITE, &handle);
+ if (result != ESP_OK) {
+ AddLog(LOG_LEVEL_DEBUG, PSTR("NVS: Error %d"), result);
+ return;
+ }
nvs_set_blob(handle, sName, pSettings, nSettingsLen);
nvs_commit(handle);
nvs_close(handle);
- interrupts();
+// interrupts();
}
int32_t NvmErase(const char *sNvsName) {
- nvs_handle handle;
- noInterrupts();
+ nvs_handle_t handle;
+// noInterrupts();
int32_t result = nvs_open(sNvsName, NVS_READWRITE, &handle);
if (ESP_OK == result) { result = nvs_erase_all(handle); }
if (ESP_OK == result) { result = nvs_commit(handle); }
nvs_close(handle);
- interrupts();
+// interrupts();
return result;
}
@@ -208,23 +217,25 @@ void SettingsErase(uint8_t type) {
}
uint32_t SettingsRead(void *data, size_t size) {
- uint32_t source = 1;
-#ifdef USE_UFILESYS
- if (!TfsLoadFile(TASM_FILE_SETTINGS, (uint8_t*)data, size)) {
-#endif
- source = 0;
- NvmLoad("main", "Settings", data, size);
#ifdef USE_UFILESYS
+ if (TfsLoadFile(TASM_FILE_SETTINGS, (uint8_t*)data, size)) {
+ return 2;
}
#endif
- return source;
+ if (NvmLoad("main", "Settings", data, size)) {
+ return 1;
+ };
+ return 0;
}
void SettingsWrite(const void *pSettings, unsigned nSettingsLen) {
#ifdef USE_UFILESYS
TfsSaveFile(TASM_FILE_SETTINGS, (const uint8_t*)pSettings, nSettingsLen);
#endif
- NvmSave("main", "Settings", pSettings, nSettingsLen);
+#ifdef USE_WEBCAM
+ if (!WcStreamActive())
+#endif
+ NvmSave("main", "Settings", pSettings, nSettingsLen);
}
void QPCRead(void *pSettings, unsigned nSettingsLen) {
diff --git a/tasmota/xdrv_50_filesystem.ino b/tasmota/xdrv_50_filesystem.ino
index 8a0ed1d16..7150fbd85 100644
--- a/tasmota/xdrv_50_filesystem.ino
+++ b/tasmota/xdrv_50_filesystem.ino
@@ -294,7 +294,23 @@ bool TfsSaveFile(const char *fname, const uint8_t *buf, uint32_t len) {
return false;
}
- file.write(buf, len);
+// This will timeout on ESP32-webcam
+// file.write(buf, len);
+
+ uint32_t count = len / 512;
+ uint32_t chunk = len / count;
+ for (uint32_t i = 0; i < count; i++) {
+ file.write(buf + (i * chunk), chunk);
+ // do actually wait a little to allow ESP32 tasks to tick
+ // fixes task timeout in ESP32Solo1 style unicore code and webcam.
+ delay(10);
+ OsWatchLoop();
+ }
+ uint32_t left = len % count;
+ if (left) {
+ file.write(buf + (count * chunk), left);
+ }
+
file.close();
return true;
}
diff --git a/tasmota/xdrv_81_esp32_webcam.ino b/tasmota/xdrv_81_esp32_webcam.ino
index dca8ec936..273885049 100644
--- a/tasmota/xdrv_81_esp32_webcam.ino
+++ b/tasmota/xdrv_81_esp32_webcam.ino
@@ -876,6 +876,10 @@ void WcStreamControl() {
WcSetup(Settings->webcam_config.resolution);
}
+bool WcStreamActive(void) {
+ return (Wc.stream_active);
+}
+
/*********************************************************************************************/
From 78c7d1a1fe52abc4444fda0766f36b481b33c202 Mon Sep 17 00:00:00 2001
From: tony-fav <42725386+tony-fav@users.noreply.github.com>
Date: Sun, 12 Dec 2021 12:23:49 -0500
Subject: [PATCH 022/402] DDP schemes for Light and WS2812
---
tasmota/xdrv_04_light.ino | 73 ++++++++++++++++++++++++++++++++++++++
tasmota/xlgt_01_ws2812.ino | 68 ++++++++++++++++++++++++++++++++++-
2 files changed, 140 insertions(+), 1 deletion(-)
diff --git a/tasmota/xdrv_04_light.ino b/tasmota/xdrv_04_light.ino
index b05386f4a..f5504d5f6 100644
--- a/tasmota/xdrv_04_light.ino
+++ b/tasmota/xdrv_04_light.ino
@@ -124,7 +124,11 @@
#define XDRV_04 4
// #define DEBUG_LIGHT
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+enum LightSchemes { LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_DDP, LS_MAX };
+#else
enum LightSchemes { LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MAX };
+#endif
const uint8_t LIGHT_COLOR_SIZE = 25; // Char array scolor size
@@ -280,6 +284,11 @@ static uint32_t min3(uint32_t a, uint32_t b, uint32_t c) {
return (a < b && a < c) ? a : (b < c) ? b : c;
}
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+WiFiUDP ddp_udp;
+uint8_t ddp_udp_up = 0;
+#endif
+
//
// LightStateClass
// This class is an abstraction of the current light state.
@@ -1615,6 +1624,51 @@ void LightCycleColor(int8_t direction)
light_controller.calcLevels(Light.new_color);
}
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+void LightListenDDP()
+{
+ // Light channels gets completely controlled over DDP. So, we don't really check other settings.
+ // To enter this scheme, we are already assured the light is at least RGB
+ static uint8_t ddp_color[5] = { 0, 0, 0, 0, 0 };
+
+ // Can't be trying to initialize UDP too early.
+ if (TasmotaGlobal.restart_flag || TasmotaGlobal.global_state.network_down) {
+ light_state.setChannels(ddp_color);
+ light_controller.calcLevels(Light.new_color);
+ return;
+ }
+
+ // Start DDP listener, if fail, just set last ddp_color
+ if (!ddp_udp_up) {
+ if (!ddp_udp.begin(4048)) {
+ light_state.setChannels(ddp_color);
+ light_controller.calcLevels(Light.new_color);
+ return;
+ }
+ ddp_udp_up = 1;
+ AddLog(LOG_LEVEL_DEBUG_MORE, "DDP: UDP Listener Started: Normal Scheme");
+ }
+
+ // Get the DDP payload over UDP
+ std::vector payload;
+ while (uint16_t packet_size = ddp_udp.parsePacket()) {
+ payload.resize(packet_size);
+ if (!ddp_udp.read(&payload[0], payload.size())) {
+ continue;
+ }
+ }
+
+ // No verification checks performed against packet besides length
+ if (payload.size() > 12) {
+ ddp_color[0] = payload[10];
+ ddp_color[1] = payload[11];
+ ddp_color[2] = payload[12];
+ }
+ light_state.setChannels(ddp_color);
+ light_controller.calcLevels(Light.new_color);
+}
+#endif
+
void LightSetPower(void)
{
// Light.power = XdrvMailbox.index;
@@ -1690,7 +1744,21 @@ void LightAnimate(void)
if (Settings->light_scheme >= LS_MAX) {
power_off = true;
}
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+ if (ddp_udp_up) {
+ ddp_udp.stop();
+ ddp_udp_up = 0;
+ AddLog(LOG_LEVEL_DEBUG_MORE, "DDP: UDP Stopped: Power Off");
+ }
+#endif
} else {
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+ if ((Settings->light_scheme < LS_MAX) && (Settings->light_scheme != LS_DDP) && (ddp_udp_up)) {
+ ddp_udp.stop();
+ ddp_udp_up = 0;
+ AddLog(LOG_LEVEL_DEBUG_MORE, "DDP: UDP Stopped: Normal Scheme not DDP");
+ }
+#endif
switch (Settings->light_scheme) {
case LS_POWER:
light_controller.calcLevels(Light.new_color);
@@ -1743,6 +1811,11 @@ void LightAnimate(void)
Light.new_color[2] = changeUIntScale(Light.new_color[2], 0, 255, 0, Settings->light_color[2]);
}
break;
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+ case LS_DDP:
+ LightListenDDP();
+ break;
+#endif
default:
XlgtCall(FUNC_SET_SCHEME);
}
diff --git a/tasmota/xlgt_01_ws2812.ino b/tasmota/xlgt_01_ws2812.ino
index 3a9e396f3..715851e4c 100644
--- a/tasmota/xlgt_01_ws2812.ino
+++ b/tasmota/xlgt_01_ws2812.ino
@@ -37,7 +37,11 @@
#define XLGT_01 1
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+const uint8_t WS2812_SCHEMES = 10; // Number of WS2812 schemes
+#else
const uint8_t WS2812_SCHEMES = 9; // Number of WS2812 schemes
+#endif
const char kWs2812Commands[] PROGMEM = "|" // No prefix
D_CMND_LED "|" D_CMND_PIXELS "|" D_CMND_ROTATION "|" D_CMND_WIDTH "|" D_CMND_STEPPIXELS ;
@@ -167,7 +171,12 @@ WsColor kwanzaa[3] = { 255,0,0, 0,0,0, 0,255,0 };
WsColor kRainbow[7] = { 255,0,0, 255,128,0, 255,255,0, 0,255,0, 0,0,255, 128,0,255, 255,0,255 };
WsColor kFire[3] = { 255,0,0, 255,102,0, 255,192,0 };
WsColor kStairs[2] = { 0,0,0, 255,255,255 };
+
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+ColorScheme kSchemes[WS2812_SCHEMES -2] = { // Skip clock scheme and DDP scheme
+#else
ColorScheme kSchemes[WS2812_SCHEMES -1] = { // Skip clock scheme
+#endif
kIncandescent, 2,
kRgb, 3,
kChristmas, 2,
@@ -492,6 +501,51 @@ void Ws2812Steps(uint32_t schemenr) {
Ws2812StripShow();
}
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+void Ws2812DDP(void)
+{
+#if (USE_WS2812_CTYPE > NEO_3LED)
+ RgbwColor c;
+ c.W = 0;
+#else
+ RgbColor c;
+#endif
+ c.R = 0;
+ c.G = 0;
+ c.B = 0;
+
+ // Can't be trying to initialize UDP too early.
+ if (TasmotaGlobal.restart_flag || TasmotaGlobal.global_state.network_down) return;
+
+ // Start DDP listener, if fail, just set last ddp_color
+ if (!ddp_udp_up) {
+ if (!ddp_udp.begin(4048)) return;
+ ddp_udp_up = 1;
+ AddLog(LOG_LEVEL_DEBUG_MORE, "DDP: UDP Listener Started: WS2812 Scheme");
+ }
+
+ // Get the DDP payload over UDP
+ std::vector payload;
+ while (uint16_t packet_size = ddp_udp.parsePacket()) {
+ payload.resize(packet_size);
+ if (!ddp_udp.read(&payload[0], payload.size())) {
+ continue;
+ }
+ }
+
+ // No verification checks performed against packet besides length
+ if (payload.size() > (9+3*Settings->light_pixels)) {
+ for (uint32_t i = 0; i < Settings->light_pixels; i++) {
+ c.R = payload[10+3*i];
+ c.G = payload[11+3*i];
+ c.B = payload[12+3*i];
+ strip->SetPixelColor(i, c);
+ }
+ Ws2812StripShow();
+ }
+}
+#endif
+
void Ws2812Clear(void)
{
strip->ClearTo(0);
@@ -580,7 +634,14 @@ bool Ws2812SetChannels(void)
void Ws2812ShowScheme(void)
{
uint32_t scheme = Settings->light_scheme - Ws2812.scheme_offset;
-
+
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+ if ((scheme != 9) && (ddp_udp_up)) {
+ ddp_udp.stop();
+ ddp_udp_up = 0;
+ AddLog(LOG_LEVEL_DEBUG_MORE, "DDP: UDP Stopped: WS2812 Scheme not DDP");
+ }
+#endif
switch (scheme) {
case 0: // Clock
if ((1 == TasmotaGlobal.state_250mS) || (Ws2812.show_next)) {
@@ -588,6 +649,11 @@ void Ws2812ShowScheme(void)
Ws2812.show_next = 0;
}
break;
+#ifdef USE_NETWORK_LIGHT_SCHEMES
+ case 9:
+ Ws2812DDP();
+ break;
+#endif
default:
if(Settings->light_step_pixels > 0){
Ws2812Steps(scheme -1);
From eb5d23131459aa3523dcc920a2e81be310323155 Mon Sep 17 00:00:00 2001
From: Barbudor
Date: Sun, 12 Dec 2021 18:46:52 +0100
Subject: [PATCH 023/402] remove topic must differ from mqttclient
---
tasmota/xdrv_02_9_mqtt.ino | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tasmota/xdrv_02_9_mqtt.ino b/tasmota/xdrv_02_9_mqtt.ino
index a1a763b47..38f6bcd88 100644
--- a/tasmota/xdrv_02_9_mqtt.ino
+++ b/tasmota/xdrv_02_9_mqtt.ino
@@ -1405,7 +1405,6 @@ void CmndMqttClient(void) {
void CmndFullTopic(void) {
if (XdrvMailbox.data_len > 0) {
MakeValidMqtt(1, XdrvMailbox.data);
- if (!strcmp(XdrvMailbox.data, TasmotaGlobal.mqtt_client)) { SetShortcutDefault(); }
char stemp1[TOPSZ];
strlcpy(stemp1, (SC_DEFAULT == Shortcut()) ? MQTT_FULLTOPIC : XdrvMailbox.data, sizeof(stemp1));
if (strcmp(stemp1, SettingsText(SET_MQTT_FULLTOPIC))) {
@@ -1460,7 +1459,10 @@ void CmndGroupTopic(void) {
if (XdrvMailbox.data_len > 0) {
uint32_t settings_text_index = (1 == XdrvMailbox.index) ? SET_MQTT_GRP_TOPIC : SET_MQTT_GRP_TOPIC2 + XdrvMailbox.index - 2;
MakeValidMqtt(0, XdrvMailbox.data);
- if (!strcmp(XdrvMailbox.data, TasmotaGlobal.mqtt_client)) { SetShortcutDefault(); }
+ if (!strcmp(XdrvMailbox.data, TasmotaGlobal.mqtt_topic)) {
+ AddLog(LOG_LEVEL_INFO, PSTR("MQT: Error: GroupTopic must differ from Topic"));
+ SetShortcutDefault();
+ }
SettingsUpdateText(settings_text_index, (SC_CLEAR == Shortcut()) ? "" : (SC_DEFAULT == Shortcut()) ? PSTR(MQTT_GRPTOPIC) : XdrvMailbox.data);
// Eliminate duplicates, have at least one and fill from index 1
@@ -1507,7 +1509,6 @@ void CmndGroupTopic(void) {
void CmndTopic(void) {
if (!XdrvMailbox.grpflg && (XdrvMailbox.data_len > 0)) {
MakeValidMqtt(0, XdrvMailbox.data);
- if (!strcmp(XdrvMailbox.data, TasmotaGlobal.mqtt_client)) { SetShortcutDefault(); }
char stemp1[TOPSZ];
strlcpy(stemp1, (SC_DEFAULT == Shortcut()) ? MQTT_TOPIC : XdrvMailbox.data, sizeof(stemp1));
if (strcmp(stemp1, SettingsText(SET_MQTT_TOPIC))) {
@@ -1523,7 +1524,6 @@ void CmndTopic(void) {
void CmndButtonTopic(void) {
if (!XdrvMailbox.grpflg && (XdrvMailbox.data_len > 0)) {
MakeValidMqtt(0, XdrvMailbox.data);
- if (!strcmp(XdrvMailbox.data, TasmotaGlobal.mqtt_client)) { SetShortcutDefault(); }
switch (Shortcut()) {
case SC_CLEAR: SettingsUpdateText(SET_MQTT_BUTTON_TOPIC, ""); break;
case SC_DEFAULT: SettingsUpdateText(SET_MQTT_BUTTON_TOPIC, TasmotaGlobal.mqtt_topic); break;
@@ -1537,7 +1537,6 @@ void CmndButtonTopic(void) {
void CmndSwitchTopic(void) {
if (!XdrvMailbox.grpflg && (XdrvMailbox.data_len > 0)) {
MakeValidMqtt(0, XdrvMailbox.data);
- if (!strcmp(XdrvMailbox.data, TasmotaGlobal.mqtt_client)) { SetShortcutDefault(); }
switch (Shortcut()) {
case SC_CLEAR: SettingsUpdateText(SET_MQTT_SWITCH_TOPIC, ""); break;
case SC_DEFAULT: SettingsUpdateText(SET_MQTT_SWITCH_TOPIC, TasmotaGlobal.mqtt_topic); break;
From b4e9468bbbfd905e8539c0aca178d92002227c3f Mon Sep 17 00:00:00 2001
From: Stephan Hadinger
Date: Sun, 12 Dec 2021 18:56:11 +0100
Subject: [PATCH 024/402] Berry mapping step 1
---
lib/libesp32/Berry/default/be_modtab.c | 8 +
lib/libesp32/Berry/default/be_tasmotalib.c | 105 +-
lib/libesp32/Berry/default/berry_conf.h | 10 +-
.../Berry/default/embedded/Tasmota.be | 24 +-
lib/libesp32/Berry/gen.sh | 2 +
lib/libesp32/Berry/generate/be_const_strtab.h | 6 +-
.../Berry/generate/be_const_strtab_def.h | 1805 ++++++++---------
.../generate/be_fixed_be_class_tasmota.h | 155 +-
lib/libesp32/Berry/generate/be_fixed_cb.h | 18 +
lib/libesp32/Berry/src/be_exec.c | 5 +-
lib/libesp32/Berry/src/be_gc.c | 10 +-
lib/libesp32/Berry/src/be_vm.c | 6 +-
lib/libesp32/Berry/src/be_vm.h | 2 -
lib/libesp32/Berry/src/berry.h | 1 +
lib/libesp32/berry_mapping/library.json | 17 +
lib/libesp32/berry_mapping/src/be_cb_module.c | 171 ++
lib/libesp32/berry_mapping/src/be_mapping.h | 10 +
tasmota/xdrv_52_0_berry_struct.ino | 1 +
tasmota/xdrv_52_1_berry_native.ino | 114 +-
tasmota/xdrv_52_3_berry_tasmota.ino | 38 +-
tasmota/xdrv_52_9_berry.ino | 94 +-
21 files changed, 1267 insertions(+), 1335 deletions(-)
create mode 100755 lib/libesp32/Berry/gen.sh
create mode 100644 lib/libesp32/Berry/generate/be_fixed_cb.h
create mode 100644 lib/libesp32/berry_mapping/library.json
create mode 100644 lib/libesp32/berry_mapping/src/be_cb_module.c
create mode 100644 lib/libesp32/berry_mapping/src/be_mapping.h
diff --git a/lib/libesp32/Berry/default/be_modtab.c b/lib/libesp32/Berry/default/be_modtab.c
index 47db8b24e..934400bbb 100644
--- a/lib/libesp32/Berry/default/be_modtab.c
+++ b/lib/libesp32/Berry/default/be_modtab.c
@@ -23,6 +23,10 @@ be_extern_native_module(solidify);
be_extern_native_module(introspect);
be_extern_native_module(strict);
+/* Berry extensions */
+#include "be_mapping.h"
+be_extern_native_module(cb);
+
/* Tasmota specific */
be_extern_native_module(python_compat);
be_extern_native_module(re);
@@ -85,6 +89,10 @@ BERRY_LOCAL const bntvmodule* const be_module_table[] = {
#if BE_USE_STRICT_MODULE
&be_native_module(strict),
#endif
+
+ /* Berry extensions */
+ &be_native_module(cb),
+
/* user-defined modules register start */
&be_native_module(python_compat),
diff --git a/lib/libesp32/Berry/default/be_tasmotalib.c b/lib/libesp32/Berry/default/be_tasmotalib.c
index e117bae70..6539b0de3 100644
--- a/lib/libesp32/Berry/default/be_tasmotalib.c
+++ b/lib/libesp32/Berry/default/be_tasmotalib.c
@@ -16,7 +16,6 @@ extern int l_arch(bvm *vm);
extern int l_publish(bvm *vm);
extern int l_publish_result(bvm *vm);
extern int l_cmd(bvm *vm);
-extern int l_get_cb(bvm *vm);
extern int l_getoption(bvm *vm);
extern int l_millis(bvm *vm);
extern int l_timereached(bvm *vm);
@@ -384,7 +383,7 @@ be_local_closure(Tasmota_try_rule, /* name */
********************************************************************/
be_local_closure(Tasmota_gen_cb, /* name */
be_nested_proto(
- 7, /* nstack */
+ 6, /* nstack */
2, /* argc */
0, /* varg */
0, /* has upvals */
@@ -392,52 +391,18 @@ be_local_closure(Tasmota_gen_cb, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 7]) { /* constants */
- /* K0 */ be_nested_str(_cb),
- /* K1 */ be_const_int(0),
- /* K2 */ be_nested_str(find),
- /* K3 */ be_nested_str(_get_cb),
- /* K4 */ be_nested_str(stop_iteration),
- /* K5 */ be_nested_str(internal_error),
- /* K6 */ be_nested_str(No_X20callback_X20available),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str(cb),
+ /* K1 */ be_nested_str(gen_cb),
}),
&be_const_str_gen_cb,
&be_const_str_solidified,
- ( &(const binstruction[34]) { /* code */
- 0x88080100, // 0000 GETMBR R2 R0 K0
- 0x4C0C0000, // 0001 LDNIL R3
- 0x1C080403, // 0002 EQ R2 R2 R3
- 0x780A0002, // 0003 JMPF R2 #0007
- 0x60080013, // 0004 GETGBL R2 G19
- 0x7C080000, // 0005 CALL R2 0
- 0x90020002, // 0006 SETMBR R0 K0 R2
- 0x60080010, // 0007 GETGBL R2 G16
- 0x540E0012, // 0008 LDINT R3 19
- 0x400E0203, // 0009 CONNECT R3 K1 R3
- 0x7C080200, // 000A CALL R2 1
- 0xA8020010, // 000B EXBLK 0 #001D
- 0x5C0C0400, // 000C MOVE R3 R2
- 0x7C0C0000, // 000D CALL R3 0
- 0x88100100, // 000E GETMBR R4 R0 K0
- 0x8C100902, // 000F GETMET R4 R4 K2
- 0x5C180600, // 0010 MOVE R6 R3
- 0x7C100400, // 0011 CALL R4 2
- 0x4C140000, // 0012 LDNIL R5
- 0x1C100805, // 0013 EQ R4 R4 R5
- 0x78120006, // 0014 JMPF R4 #001C
- 0x88100100, // 0015 GETMBR R4 R0 K0
- 0x98100601, // 0016 SETIDX R4 R3 R1
- 0x8C100103, // 0017 GETMET R4 R0 K3
- 0x5C180600, // 0018 MOVE R6 R3
- 0x7C100400, // 0019 CALL R4 2
- 0xA8040001, // 001A EXBLK 1 1
- 0x80040800, // 001B RET 1 R4
- 0x7001FFEE, // 001C JMP #000C
- 0x58080004, // 001D LDCONST R2 K4
- 0xAC080200, // 001E CATCH R2 1 0
- 0xB0080000, // 001F RAISE 2 R0 R0
- 0xB0060B06, // 0020 RAISE 1 K5 K6
- 0x80000000, // 0021 RET 0
+ ( &(const binstruction[ 5]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x8C0C0501, // 0001 GETMET R3 R2 K1
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C0C0400, // 0003 CALL R3 2
+ 0x80040600, // 0004 RET 1 R3
})
)
);
@@ -1605,53 +1570,6 @@ be_local_closure(Tasmota_exec_rules, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: cb_dispatch
-********************************************************************/
-be_local_closure(Tasmota_cb_dispatch, /* name */
- be_nested_proto(
- 12, /* nstack */
- 6, /* argc */
- 0, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str(_cb),
- /* K1 */ be_const_int(0),
- /* K2 */ be_nested_str(find),
- }),
- &be_const_str_cb_dispatch,
- &be_const_str_solidified,
- ( &(const binstruction[20]) { /* code */
- 0x88180100, // 0000 GETMBR R6 R0 K0
- 0x4C1C0000, // 0001 LDNIL R7
- 0x1C180C07, // 0002 EQ R6 R6 R7
- 0x781A0000, // 0003 JMPF R6 #0005
- 0x80060200, // 0004 RET 1 K1
- 0x88180100, // 0005 GETMBR R6 R0 K0
- 0x8C180D02, // 0006 GETMET R6 R6 K2
- 0x5C200200, // 0007 MOVE R8 R1
- 0x7C180400, // 0008 CALL R6 2
- 0x4C1C0000, // 0009 LDNIL R7
- 0x201C0C07, // 000A NE R7 R6 R7
- 0x781E0006, // 000B JMPF R7 #0013
- 0x5C1C0C00, // 000C MOVE R7 R6
- 0x5C200400, // 000D MOVE R8 R2
- 0x5C240600, // 000E MOVE R9 R3
- 0x5C280800, // 000F MOVE R10 R4
- 0x5C2C0A00, // 0010 MOVE R11 R5
- 0x7C1C0800, // 0011 CALL R7 4
- 0x80040E00, // 0012 RET 1 R7
- 0x80060200, // 0013 RET 1 K1
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: hs2rgb
********************************************************************/
@@ -2072,7 +1990,6 @@ class be_class_tasmota (scope: global, name: Tasmota) {
_timers, var
_ccmd, var
_drivers, var
- _cb, var
wire1, var
wire2, var
global, var
@@ -2094,7 +2011,6 @@ class be_class_tasmota (scope: global, name: Tasmota) {
publish, func(l_publish)
publish_result, func(l_publish_result)
_cmd, func(l_cmd)
- _get_cb, func(l_get_cb)
get_option, func(l_getoption)
millis, func(l_millis)
time_reached, func(l_timereached)
@@ -2155,7 +2071,6 @@ class be_class_tasmota (scope: global, name: Tasmota) {
hs2rgb, closure(Tasmota_hs2rgb_closure)
- cb_dispatch, closure(Tasmota_cb_dispatch_closure)
gen_cb, closure(Tasmota_gen_cb_closure)
get_light, closure(Tasmota_get_light_closure)
diff --git a/lib/libesp32/Berry/default/berry_conf.h b/lib/libesp32/Berry/default/berry_conf.h
index d2284ac31..607a9c612 100644
--- a/lib/libesp32/Berry/default/berry_conf.h
+++ b/lib/libesp32/Berry/default/berry_conf.h
@@ -65,20 +65,14 @@
**/
#define BE_DEBUG_VAR_INFO 0
-/* Macro: BE_USE_OBSERVABILITY_HOOK
- * Use the obshook function to report low-level actions.
- * Default: 0
- **/
-#define BE_USE_OBSERVABILITY_HOOK 1
-
-/* Macro: BE_USE_OBSERVABILITY_HOOK
+/* Macro: BE_USE_PERF_COUNTERS
* Use the obshook function to report low-level actions.
* Default: 0
**/
#define BE_USE_PERF_COUNTERS 1
/* Macro: BE_VM_OBSERVABILITY_SAMPLING
- * If BE_USE_OBSERVABILITY_HOOK == 1 and BE_USE_PERF_COUNTERS == 1
+ * If BE_USE_PERF_COUNTERS == 1
* then the observability hook is called regularly in the VM loop
* allowing to stop infinite loops or too-long running code.
* The value is a power of 2.
diff --git a/lib/libesp32/Berry/default/embedded/Tasmota.be b/lib/libesp32/Berry/default/embedded/Tasmota.be
index 3305d57ff..22752a47d 100644
--- a/lib/libesp32/Berry/default/embedded/Tasmota.be
+++ b/lib/libesp32/Berry/default/embedded/Tasmota.be
@@ -21,7 +21,6 @@ class Tasmota
var _timers
var _ccmd
var _drivers
- var _cb
var wire1
var wire2
var cmd_res # store the command result, nil if disables, true if capture enabled, contains return value
@@ -520,28 +519,11 @@ class Tasmota
end
end
-
- #- dispatch callback number n, with parameters v0,v1,v2,v3 -#
- def cb_dispatch(n,v0,v1,v2,v3)
- if self._cb == nil return 0 end
- var f = self._cb.find(n)
- if f != nil
- return f(v0,v1,v2,v3)
- end
- return 0
- end
-
#- generate a new C callback and record the associated Berry closure -#
def gen_cb(f)
- if self._cb == nil self._cb = {} end # create map if not already initialized
- for i:0..19
- if self._cb.find(i) == nil
- #- free slot -#
- self._cb[i] = f
- return self._get_cb(i)
- end
- end
- raise "internal_error", "No callback available"
+ # DEPRECATED
+ import cb
+ return cb.gen_cb(f)
end
#- convert hue/sat to rgb -#
diff --git a/lib/libesp32/Berry/gen.sh b/lib/libesp32/Berry/gen.sh
new file mode 100755
index 000000000..303a62c95
--- /dev/null
+++ b/lib/libesp32/Berry/gen.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+python3 tools/pycoc/main.py -o generate src default ../berry_mapping/src -c default/berry_conf.h
diff --git a/lib/libesp32/Berry/generate/be_const_strtab.h b/lib/libesp32/Berry/generate/be_const_strtab.h
index 9692c8508..50198eb8f 100644
--- a/lib/libesp32/Berry/generate/be_const_strtab.h
+++ b/lib/libesp32/Berry/generate/be_const_strtab.h
@@ -48,7 +48,6 @@ extern const bcstring be_const_str_I2C_X3A;
extern const bcstring be_const_str_LVG_X3A_X20call_X20to_X20unsupported_X20callback;
extern const bcstring be_const_str_Leds;
extern const bcstring be_const_str_MD5;
-extern const bcstring be_const_str_No_X20callback_X20available;
extern const bcstring be_const_str_None;
extern const bcstring be_const_str_OPTION_A;
extern const bcstring be_const_str_OneWire;
@@ -175,7 +174,6 @@ extern const bcstring be_const_str__archive;
extern const bcstring be_const_str__available;
extern const bcstring be_const_str__begin_transmission;
extern const bcstring be_const_str__buffer;
-extern const bcstring be_const_str__cb;
extern const bcstring be_const_str__ccmd;
extern const bcstring be_const_str__class;
extern const bcstring be_const_str__cmd;
@@ -187,7 +185,6 @@ extern const bcstring be_const_str__end_transmission;
extern const bcstring be_const_str__energy;
extern const bcstring be_const_str__error;
extern const bcstring be_const_str__filename;
-extern const bcstring be_const_str__get_cb;
extern const bcstring be_const_str__global_addr;
extern const bcstring be_const_str__global_def;
extern const bcstring be_const_str__lvgl;
@@ -250,7 +247,7 @@ extern const bcstring be_const_str_call;
extern const bcstring be_const_str_call_native;
extern const bcstring be_const_str_calldepth;
extern const bcstring be_const_str_can_show;
-extern const bcstring be_const_str_cb_dispatch;
+extern const bcstring be_const_str_cb;
extern const bcstring be_const_str_cb_do_nothing;
extern const bcstring be_const_str_cb_event_closure;
extern const bcstring be_const_str_cb_obj;
@@ -384,6 +381,7 @@ extern const bcstring be_const_str_get_bat_power;
extern const bcstring be_const_str_get_bat_voltage;
extern const bcstring be_const_str_get_battery_chargin_status;
extern const bcstring be_const_str_get_bri;
+extern const bcstring be_const_str_get_cb_list;
extern const bcstring be_const_str_get_coords;
extern const bcstring be_const_str_get_current_module_name;
extern const bcstring be_const_str_get_current_module_path;
diff --git a/lib/libesp32/Berry/generate/be_const_strtab_def.h b/lib/libesp32/Berry/generate/be_const_strtab_def.h
index 44676a35e..4c195c96b 100644
--- a/lib/libesp32/Berry/generate/be_const_strtab_def.h
+++ b/lib/libesp32/Berry/generate/be_const_strtab_def.h
@@ -1,636 +1,634 @@
-be_define_const_str(, "", 2166136261u, 0, 0, &be_const_str_True);
-be_define_const_str(_X0A, "\n", 252472541u, 0, 1, &be_const_str_i2c_enabled);
-be_define_const_str(_X20, " ", 621580159u, 0, 1, &be_const_str_add_cmd);
-be_define_const_str(_X21_X3D, "!=", 2428715011u, 0, 2, &be_const_str__X23autoexec_X2Ebe);
-be_define_const_str(_X21_X3D_X3D, "!==", 559817114u, 0, 3, &be_const_str__X2Ew);
-be_define_const_str(_X23, "#", 638357778u, 0, 1, &be_const_str_No_X20callback_X20available);
-be_define_const_str(_X23autoexec_X2Ebat, "#autoexec.bat", 3382890497u, 0, 13, NULL);
-be_define_const_str(_X23autoexec_X2Ebe, "#autoexec.be", 1181757091u, 0, 12, &be_const_str_assert);
-be_define_const_str(_X23display_X2Eini, "#display.ini", 182218220u, 0, 12, &be_const_str_code);
-be_define_const_str(_X23init_X2Ebat, "#init.bat", 3297595077u, 0, 9, &be_const_str__X2502d_X25s_X2502d);
-be_define_const_str(_X23preinit_X2Ebe, "#preinit.be", 687035716u, 0, 11, &be_const_str__timers);
-be_define_const_str(_X2502d_X25s_X2502d, "%02d%s%02d", 1587999717u, 0, 10, &be_const_str__X3D_X3C_X3E_X21);
-be_define_const_str(_X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d, "%04d-%02d-%02dT%02d:%02d:%02d", 3425528601u, 0, 29, &be_const_str_get_object_from_ptr);
-be_define_const_str(_X25s_X2Eautoconf, "%s.autoconf", 3560383524u, 0, 11, &be_const_str_RES_OK);
-be_define_const_str(_X26lt_X3BError_X3A_X20apply_X20new_X20or_X20remove_X26gt_X3B, "<Error: apply new or remove>", 2855507949u, 0, 34, &be_const_str_hs2rgb);
-be_define_const_str(_X26lt_X3BNone_X26gt_X3B, "<None>", 2602165498u, 0, 12, &be_const_str__X2Fac);
-be_define_const_str(_X28_X29, "()", 685372826u, 0, 2, NULL);
-be_define_const_str(_X2B, "+", 772578730u, 0, 1, &be_const_str_lower);
-be_define_const_str(_X2C, ",", 688690635u, 0, 1, &be_const_str_SERIAL_7O1);
-be_define_const_str(_X2D_X2D_X3A_X2D_X2D, "--:--", 1370615441u, 0, 5, &be_const_str__X3Cp_X3ECurrent_X20configuration_X3A_X20_X3C_X2Fp_X3E_X3Cp_X3E_X3Cb_X3E_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E);
-be_define_const_str(_X2E, ".", 722245873u, 0, 1, &be_const_str_search);
-be_define_const_str(_X2E_X2E, "..", 2748622605u, 0, 2, &be_const_str__debug_present);
-be_define_const_str(_X2Eautoconf, ".autoconf", 2524679088u, 0, 9, &be_const_str_false);
-be_define_const_str(_X2Ebe, ".be", 1325797348u, 0, 3, &be_const_str_Tasmota);
-be_define_const_str(_X2Ebec, ".bec", 3985273221u, 0, 4, &be_const_str_CFG_X3A_X20downloading_X20_X27_X25s_X27);
-be_define_const_str(_X2Elen, ".len", 850842136u, 0, 4, &be_const_str__X3Cselect_X20name_X3D_X27zip_X27_X3E);
-be_define_const_str(_X2Ep, ".p", 1171526419u, 0, 2, NULL);
-be_define_const_str(_X2Ep1, ".p1", 249175686u, 0, 3, &be_const_str__t);
-be_define_const_str(_X2Ep2, ".p2", 232398067u, 0, 3, &be_const_str_BRY_X3A_X20could_X20not_X20save_X20compiled_X20file_X20_X25s_X20_X28_X25s_X29);
-be_define_const_str(_X2Esize, ".size", 1965188224u, 0, 5, &be_const_str_is_first_time);
-be_define_const_str(_X2Etapp, ".tapp", 1363391594u, 0, 5, &be_const_str__X7B);
-be_define_const_str(_X2Ew, ".w", 1255414514u, 0, 2, &be_const_str_clear);
-be_define_const_str(_X2F, "/", 705468254u, 0, 1, &be_const_str_SERIAL_7O2);
-be_define_const_str(_X2F_X2Eautoconf, "/.autoconf", 2212074393u, 0, 10, &be_const_str_CFG_X3A_X20exception_X20_X27_X25s_X27_X20_X2D_X20_X27_X25s_X27);
-be_define_const_str(_X2F_X3Frst_X3D, "/?rst=", 580074707u, 0, 6, &be_const_str_SERIAL_7N2);
-be_define_const_str(_X2Fac, "/ac", 3904651978u, 0, 3, &be_const_str_WS2812);
-be_define_const_str(_X3A, ":", 1057798253u, 0, 1, &be_const_str_AudioFileSourceFS);
-be_define_const_str(_X3C, "<", 957132539u, 0, 1, &be_const_str_digital_write);
-be_define_const_str(_X3C_X2Fform_X3E_X3C_X2Fp_X3E, "
", 3546571739u, 0, 11, &be_const_str_LVG_X3A_X20call_X20to_X20unsupported_X20callback);
-be_define_const_str(_X3C_X2Fselect_X3E_X3Cp_X3E_X3C_X2Fp_X3E, "", 1863865923u, 0, 16, &be_const_str_rule);
-be_define_const_str(_X3C_X3D, "<=", 2499223986u, 0, 2, &be_const_str_set_chg_current);
-be_define_const_str(_X3Cbutton_X20name_X3D_X27reapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3ERe_X2Dapply_X20current_X20configuration_X3C_X2Fbutton_X3E, "", 3147934216u, 0, 82, &be_const_str_find_op);
-be_define_const_str(_X3Cbutton_X20name_X3D_X27zipapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3EApply_X20configuration_X3C_X2Fbutton_X3E, "", 1205771629u, 0, 72, NULL);
-be_define_const_str(_X3Cfieldset_X3E_X3Cstyle_X3E_X2Ebdis_X7Bbackground_X3A_X23888_X3B_X7D_X2Ebdis_X3Ahover_X7Bbackground_X3A_X23888_X3B_X7D_X3C_X2Fstyle_X3E, "", 2052843416u, 0, 25, &be_const_str_button_pressed);
+be_define_const_str(, "", 2166136261u, 0, 0, NULL);
+be_define_const_str(_X0A, "\n", 252472541u, 0, 1, &be_const_str_Unknown_X20command);
+be_define_const_str(_X20, " ", 621580159u, 0, 1, &be_const_str_geti);
+be_define_const_str(_X21_X3D, "!=", 2428715011u, 0, 2, &be_const_str_asstring);
+be_define_const_str(_X21_X3D_X3D, "!==", 559817114u, 0, 3, &be_const_str_type);
+be_define_const_str(_X23, "#", 638357778u, 0, 1, &be_const_str_CFG_X3A_X20no_X20_X27_X2A_X2Eautoconf_X27_X20file_X20found);
+be_define_const_str(_X23autoexec_X2Ebat, "#autoexec.bat", 3382890497u, 0, 13, &be_const_str_arg_size);
+be_define_const_str(_X23autoexec_X2Ebe, "#autoexec.be", 1181757091u, 0, 12, &be_const_str_file_X20extension_X20is_X20not_X20_X27_X2Ebe_X27_X20or_X20_X27_X2Ebec_X27);
+be_define_const_str(_X23display_X2Eini, "#display.ini", 182218220u, 0, 12, &be_const_str___lower__);
+be_define_const_str(_X23init_X2Ebat, "#init.bat", 3297595077u, 0, 9, &be_const_str_SERIAL_7O2);
+be_define_const_str(_X23preinit_X2Ebe, "#preinit.be", 687035716u, 0, 11, &be_const_str_SERIAL_8O2);
+be_define_const_str(_X2502d_X25s_X2502d, "%02d%s%02d", 1587999717u, 0, 10, &be_const_str_yield);
+be_define_const_str(_X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d, "%04d-%02d-%02dT%02d:%02d:%02d", 3425528601u, 0, 29, &be_const_str__global_def);
+be_define_const_str(_X25s_X2Eautoconf, "%s.autoconf", 3560383524u, 0, 11, &be_const_str_every_second);
+be_define_const_str(_X26lt_X3BError_X3A_X20apply_X20new_X20or_X20remove_X26gt_X3B, "<Error: apply new or remove>", 2855507949u, 0, 34, &be_const_str_add_driver);
+be_define_const_str(_X26lt_X3BNone_X26gt_X3B, "<None>", 2602165498u, 0, 12, &be_const_str_rand);
+be_define_const_str(_X28_X29, "()", 685372826u, 0, 2, &be_const_str__X3Cinstance_X3A_X20_X25s_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29);
+be_define_const_str(_X2B, "+", 772578730u, 0, 1, &be_const_str_gpio);
+be_define_const_str(_X2C, ",", 688690635u, 0, 1, &be_const_str_add_cmd);
+be_define_const_str(_X2D_X2D_X3A_X2D_X2D, "--:--", 1370615441u, 0, 5, &be_const_str_AudioOutputI2S);
+be_define_const_str(_X2E, ".", 722245873u, 0, 1, NULL);
+be_define_const_str(_X2E_X2E, "..", 2748622605u, 0, 2, &be_const_str__X2Ep2);
+be_define_const_str(_X2Eautoconf, ".autoconf", 2524679088u, 0, 9, NULL);
+be_define_const_str(_X2Ebe, ".be", 1325797348u, 0, 3, &be_const_str_sinh);
+be_define_const_str(_X2Ebec, ".bec", 3985273221u, 0, 4, &be_const_str__debug_present);
+be_define_const_str(_X2Elen, ".len", 850842136u, 0, 4, NULL);
+be_define_const_str(_X2Ep, ".p", 1171526419u, 0, 2, &be_const_str_COLOR_WHITE);
+be_define_const_str(_X2Ep1, ".p1", 249175686u, 0, 3, &be_const_str_sin);
+be_define_const_str(_X2Ep2, ".p2", 232398067u, 0, 3, &be_const_str_json_fdump_map);
+be_define_const_str(_X2Esize, ".size", 1965188224u, 0, 5, &be_const_str__X2Fac);
+be_define_const_str(_X2Etapp, ".tapp", 1363391594u, 0, 5, NULL);
+be_define_const_str(_X2Ew, ".w", 1255414514u, 0, 2, &be_const_str_member);
+be_define_const_str(_X2F, "/", 705468254u, 0, 1, &be_const_str_None);
+be_define_const_str(_X2F_X2Eautoconf, "/.autoconf", 2212074393u, 0, 10, &be_const_str_set_dc_voltage);
+be_define_const_str(_X2F_X3Frst_X3D, "/?rst=", 580074707u, 0, 6, &be_const_str_AES_GCM);
+be_define_const_str(_X2Fac, "/ac", 3904651978u, 0, 3, &be_const_str_get_current_module_path);
+be_define_const_str(_X3A, ":", 1057798253u, 0, 1, &be_const_str_json_fdump);
+be_define_const_str(_X3C, "<", 957132539u, 0, 1, NULL);
+be_define_const_str(_X3C_X2Fform_X3E_X3C_X2Fp_X3E, "", 3546571739u, 0, 11, &be_const_str_atan);
+be_define_const_str(_X3C_X2Fselect_X3E_X3Cp_X3E_X3C_X2Fp_X3E, "", 1863865923u, 0, 16, NULL);
+be_define_const_str(_X3C_X3D, "<=", 2499223986u, 0, 2, &be_const_str_HTTP_POST);
+be_define_const_str(_X3Cbutton_X20name_X3D_X27reapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3ERe_X2Dapply_X20current_X20configuration_X3C_X2Fbutton_X3E, "", 3147934216u, 0, 82, &be_const_str_Wire);
+be_define_const_str(_X3Cbutton_X20name_X3D_X27zipapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3EApply_X20configuration_X3C_X2Fbutton_X3E, "", 1205771629u, 0, 72, &be_const_str_color);
+be_define_const_str(_X3Cfieldset_X3E_X3Cstyle_X3E_X2Ebdis_X7Bbackground_X3A_X23888_X3B_X7D_X2Ebdis_X3Ahover_X7Bbackground_X3A_X23888_X3B_X7D_X3C_X2Fstyle_X3E, "", 2052843416u, 0, 25, &be_const_str_area);
be_define_const_str(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27ac_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E_X26_X23129668_X3B_X20Auto_X2Dconfiguration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E, "", 452285201u, 0, 120, NULL);
-be_define_const_str(_X3Cp_X3E_X3Cform_X20id_X3Dreapply_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20action_X3D_X27_X2Fac_X27_X20method_X3D_X27post_X27_X20, "", 452285201u, 0, 120, NULL);
+be_define_const_str(_X3Cp_X3E_X3Cform_X20id_X3Dreapply_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20action_X3D_X27_X2Fac_X27_X20method_X3D_X27post_X27_X20, "", 3546571739u, 0, 11, &be_const_str_atan);
-be_define_const_str(_X3C_X2Fselect_X3E_X3Cp_X3E_X3C_X2Fp_X3E, "", 1863865923u, 0, 16, NULL);
-be_define_const_str(_X3C_X3D, "<=", 2499223986u, 0, 2, &be_const_str_HTTP_POST);
-be_define_const_str(_X3Cbutton_X20name_X3D_X27reapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3ERe_X2Dapply_X20current_X20configuration_X3C_X2Fbutton_X3E, "", 3147934216u, 0, 82, &be_const_str_Wire);
-be_define_const_str(_X3Cbutton_X20name_X3D_X27zipapply_X27_X20class_X3D_X27button_X20bgrn_X27_X3EApply_X20configuration_X3C_X2Fbutton_X3E, "", 1205771629u, 0, 72, &be_const_str_color);
-be_define_const_str(_X3Cfieldset_X3E_X3Cstyle_X3E_X2Ebdis_X7Bbackground_X3A_X23888_X3B_X7D_X2Ebdis_X3Ahover_X7Bbackground_X3A_X23888_X3B_X7D_X3C_X2Fstyle_X3E, "", 2052843416u, 0, 25, &be_const_str_area);
-be_define_const_str(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27ac_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E_X26_X23129668_X3B_X20Auto_X2Dconfiguration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E, "", 452285201u, 0, 120, NULL);
-be_define_const_str(_X3Cp_X3E_X3Cform_X20id_X3Dreapply_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20action_X3D_X27_X2Fac_X27_X20method_X3D_X27post_X27_X20, " (This feature requires an internet connection)", 2719266486u, 0, 74, &be_const_str_register_obj);
-be_define_const_str(_X3Cp_X3ECurrent_X20configuration_X3A_X20_X3C_X2Fp_X3E_X3Cp_X3E_X3Cb_X3E_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E, "Current configuration:
%s
", 4115655761u, 0, 46, &be_const_str_get_cb_list);
-be_define_const_str(_X3Cselect_X20name_X3D_X27zip_X27_X3E, "