Merge branch 'arendst:development' into rgx-port-forward-for-esp8266-too

This commit is contained in:
joba-1 2022-11-17 12:40:10 +01:00 committed by GitHub
commit 2df095d57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 12 deletions

View File

@ -3,7 +3,19 @@ All notable changes to this project will be documented in this file.
## [Unreleased] - Development
## [12.2.0.4]
## [12.2.0.5]
### Added
### Breaking Changed
### Changed
### Fixed
- ModbusBridge baudrates over 76500 baud (#17106)
### Removed
## [12.2.0.4] 20221117
### Added
- Support for Plantower PMSx003T AQI models with temperature and humidity (#16971)
- Support for Dingtian x595/x165 shift register based relay boards by Barbudor (#17032)
@ -15,8 +27,6 @@ All notable changes to this project will be documented in this file.
- Command ``RgxClients`` for range extender clients list (#17048)
- Command ``RgxPort [tcp|udp], gateway_port, client_mac, client_port`` for range extender port forwardings (#17092)
### Breaking Changed
### Changed
- Reverted Flash Mode back from ``DIO`` to ``DOUT`` for ESP8266/ESP8285 (#17019)
- ESP32 Framework (Core) from v2.0.5.2 to v2.0.5.3 (#17034)

View File

@ -107,7 +107,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
[Complete list](BUILDS.md) of available feature and sensors.
## Changelog v12.2.0.4
## Changelog v12.2.0.5
### Added
- Command ``SetOption47 1..255`` to delay power on relay state in seconds reducing power surge. ``SO47 1`` delays until network connected. ``SO47 2`` delays until mqtt connected
- Command ``RgxClients`` for range extender clients list [#17048](https://github.com/arendst/Tasmota/issues/17048)
@ -149,6 +149,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
- Deduplicate code and fix %timer n% rule regression from v12.2.0 [#16914](https://github.com/arendst/Tasmota/issues/16914)
- Serial initialization for baudrate and config [#16970](https://github.com/arendst/Tasmota/issues/16970)
- ModbusBridge buffer overflow [#16979](https://github.com/arendst/Tasmota/issues/16979)
- ModbusBridge baudrates over 76500 baud [#17106](https://github.com/arendst/Tasmota/issues/17106)
- SenseAir S8 module detection [#17033](https://github.com/arendst/Tasmota/issues/17033)
### Removed

View File

@ -729,7 +729,9 @@ typedef struct {
WebCamCfg2 webcam_config2; // 730
#endif // ESP32
uint16_t artnet_universe; // 734
uint8_t free_esp32_734[7]; // 736
uint16_t modbus_sbaudrate; // 736
uint8_t free_esp32_738[5]; // 738
uint8_t novasds_startingoffset; // 73D
uint8_t web_color[18][3]; // 73E
@ -830,7 +832,9 @@ typedef struct {
uint8_t shd_warmup_time; // F5E
uint8_t tcp_config; // F5F
uint8_t light_step_pixels; // F60
uint8_t modbus_sbaudrate; // F61
uint8_t ex_modbus_sbaudrate; // F61 - v12.2.0.5
uint8_t modbus_sconfig; // F62
uint8_t free_f63[13]; // F63 - Decrement if adding new Setting variables just above and below

View File

@ -20,6 +20,6 @@
#ifndef _TASMOTA_VERSION_H_
#define _TASMOTA_VERSION_H_
const uint32_t VERSION = 0x0C020004; // 12.2.0.4
const uint32_t VERSION = 0x0C020005; // 12.2.0.5
#endif // _TASMOTA_VERSION_H_

View File

@ -1607,6 +1607,9 @@ void SettingsDelta(void) {
Settings->energy_voltage_calibration2 = Settings->energy_voltage_calibration;
Settings->energy_current_calibration2 = Settings->energy_current_calibration;
}
if (Settings->version < 0x0C020005) { // 12.2.0.5
Settings->modbus_sbaudrate = Settings->ex_modbus_sbaudrate;
}
Settings->version = VERSION;
SettingsSave(1);

View File

@ -210,13 +210,20 @@ void WifiBegin(uint8_t flag, uint8_t channel)
#endif // USE_EMULATION
WiFi.persistent(false); // Solve possible wifi init errors (re-add at 6.2.1.16 #4044, #4083)
if (WiFi.getMode() != WIFI_AP_STA) // Preserve range extender connections
{
WiFi.disconnect(true); // Delete SDK wifi config
/*
// Replaced by below code (20221117)
WiFi.disconnect(true); // Delete SDK wifi config
delay(200);
WifiSetMode(WIFI_STA); // Disable AP mode
*/
if (WiFi.getMode() != WIFI_AP_STA) { // Preserve range extender connections (#17103)
WiFi.disconnect(true); // Delete SDK wifi config
delay(200);
WifiSetMode(WIFI_STA); // Disable AP mode
WifiSetMode(WIFI_STA); // Disable AP mode
}
WiFiSetSleepMode();
// if (WiFi.getPhyMode() != WIFI_PHY_MODE_11N) { WiFi.setPhyMode(WIFI_PHY_MODE_11N); } // B/G/N
// if (WiFi.getPhyMode() != WIFI_PHY_MODE_11G) { WiFi.setPhyMode(WIFI_PHY_MODE_11G); } // B/G

View File

@ -21,6 +21,10 @@
#ifdef USE_LIGHT
#ifdef USE_LIGHT_ARTNET
#ifndef USE_WS2812
#define USE_WS2812 // needed since USE_LIGHT_ARTNET is enabled for ESP32 by default
#endif
#ifndef WS2812_ARTNET_UDP_BUFFER_SIZE
#define WS2812_ARTNET_UDP_BUFFER_SIZE 140 // Max 30 columns with 4 bytes per pixel
#endif
@ -146,8 +150,12 @@ void ArtNetProcessPacket(uint8_t * buf, size_t len) {
if (artnet_conf.matrix) {
// Ws2812 led strip
size_t pix_size = Ws2812StripGetPixelSize();
// check that datalen does not exceed the number of columns
if (datalen > artnet_conf.cols * pix_size) { datalen = artnet_conf.cols * pix_size; }
// round to exact number of pixels
datalen = datalen - (datalen % pix_size);
size_t offset_in_matrix = 0;
if (artnet_conf.alt && (row % 2)) {
for (int32_t i = idx, j = idx + datalen - pix_size; i < j; i += pix_size, j -= pix_size) {
for (int32_t k = 0; k < pix_size; k++) {
@ -156,6 +164,7 @@ void ArtNetProcessPacket(uint8_t * buf, size_t len) {
buf[j+k] = temp;
}
}
offset_in_matrix = artnet_conf.cols * pix_size - datalen; // add a potential offset if the frame is smaller than the columns
}
// process dimmer
@ -179,7 +188,7 @@ void ArtNetProcessPacket(uint8_t * buf, size_t len) {
// process pixels
size_t h_bytes = artnet_conf.cols * pix_size; // size in bytes of a single row
size_t offset_in_matrix = artnet_conf.offs * pix_size + row * h_bytes;
offset_in_matrix += artnet_conf.offs * pix_size + row * h_bytes;
if (datalen > h_bytes) { datalen = h_bytes; } // copy at most one line
Ws2812CopyPixels(&buf[idx], datalen, offset_in_matrix);
@ -366,6 +375,8 @@ bool ArtNetStart(void) {
Settings->light_pixels = artnet_conf.rows * artnet_conf.cols + artnet_conf.offs;
Settings->light_rotation = 0;
Ws2812ReinitStrip();
} else {
Ws2812Clear();
}
}