Add POWR3xxD and THR3xxD overflow display

This commit is contained in:
Theo Arends 2022-07-07 14:24:53 +02:00
parent 16467f15a5
commit f3b1c4d543
3 changed files with 13 additions and 4 deletions

View File

@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
### Changed
- Driver DHT v6 consolidation for both ESP8266 and ESP32 to support SI7021, THS01 and MS01 on ESP32 (#15856)
- Tasmota ESP32 Arduino core from v2.0.3 to v2.0.4 (#15940)
### Fixed

View File

@ -77,7 +77,7 @@ Historical binaries can be downloaded from
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
### ESP32, ESP32-C3, ESP32-S2 and ESP32-S3 based
The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.3**.
The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.4**.
- **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY**
- **tasmota32xy.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C3/S2/S3 and 4M+ flash.
@ -118,6 +118,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
### Breaking Changed
### Changed
- Tasmota ESP32 Arduino core from v2.0.3 to v2.0.4 [#15940](https://github.com/arendst/Tasmota/issues/15940)
- Driver DHT v6 consolidation for both ESP8266 and ESP32 to support SI7021, THS01 and MS01 on ESP32 [#15856](https://github.com/arendst/Tasmota/issues/15856)
### Fixed

View File

@ -112,6 +112,9 @@ void TM1621SendCommon(uint8_t common) {
}
void TM1621SendRows(void) {
// Tm1621.row[x] = "text", "----", " " or a number with one decimal like "0.4", "237.5", "123456.7"
// "123456.7" will be shown as "9999" being a four digit overflow
// AddLog(LOG_LEVEL_DEBUG, PSTR("TM1: Row1 '%s', Row2 '%s'"), Tm1621.row[0], Tm1621.row[1]);
uint8_t buffer[8] = { 0 }; // TM1621 16-segment 4-bit common buffer
@ -119,12 +122,16 @@ void TM1621SendRows(void) {
for (uint32_t j = 0; j < 2; j++) {
// 0.4V => " 04", 0.0A => " ", 1234.5V => "1234"
uint32_t len = strlen(Tm1621.row[j]);
char *dp = nullptr;
int row_idx = len -3;
if (len <= 5) {
char *dp = nullptr; // Expect number larger than "123"
int row_idx = len -3; // "1234.5"
if (len <= 5) { // "----", " ", "0.4", "237.5"
dp = strchr(Tm1621.row[j], '.');
row_idx = len -1;
}
else if (len > 6) { // "12345.6"
snprintf_P(Tm1621.row[j], sizeof(Tm1621.row[j]), PSTR("9999"));
row_idx = 3;
}
row[3] = (row_idx >= 0) ? Tm1621.row[j][row_idx--] : ' ';
if ((row_idx >= 0) && dp) { row_idx--; }
row[2] = (row_idx >= 0) ? Tm1621.row[j][row_idx--] : ' ';