mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Fix OTA minimal gzipped detection
Fix OTA minimal gzipped detection regression from 8.1.0.3
This commit is contained in:
parent
65d1f3aace
commit
e8ce1eb641
@ -65,6 +65,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
|
|||||||
- Fix Display handling of hexadecimal escape characters (#7387)
|
- Fix Display handling of hexadecimal escape characters (#7387)
|
||||||
- Fix ``WakeUp <x>`` ignores provided value (#7473)
|
- Fix ``WakeUp <x>`` ignores provided value (#7473)
|
||||||
- Fix exception 9 restart on log message in Ticker interrupt service routines NTP, Wemos and Hue emulation (#7496)
|
- Fix exception 9 restart on log message in Ticker interrupt service routines NTP, Wemos and Hue emulation (#7496)
|
||||||
|
- Fix ``PowerDelta`` zero power detection (#7515)
|
||||||
- Add command ``SetOption79 0/1`` to enable reset of counters at teleperiod time by Andre Thomas (#7355)
|
- Add command ``SetOption79 0/1`` to enable reset of counters at teleperiod time by Andre Thomas (#7355)
|
||||||
- Add command ``SetOption82 0/1`` to limit the CT range for Alexa to 200..380
|
- Add command ``SetOption82 0/1`` to limit the CT range for Alexa to 200..380
|
||||||
- Add command ``ShutterButton <parameters>`` to control shutter(s) by to-scho (#7403)
|
- Add command ``ShutterButton <parameters>`` to control shutter(s) by to-scho (#7403)
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
### 8.1.0.4 20200116
|
### 8.1.0.4 20200116
|
||||||
|
|
||||||
|
- Fix ``PowerDelta`` zero power detection (#7515)
|
||||||
|
- Fix OTA minimal gzipped detection regression from 8.1.0.3
|
||||||
- Add web page sliders when ``SetOption37 128`` is active allowing control of white(s)
|
- Add web page sliders when ``SetOption37 128`` is active allowing control of white(s)
|
||||||
|
|
||||||
### 8.1.0.3 20200106
|
### 8.1.0.3 20200106
|
||||||
|
@ -887,14 +887,19 @@ void Every250mSeconds(void)
|
|||||||
if (RtcSettings.ota_loader) {
|
if (RtcSettings.ota_loader) {
|
||||||
char *bch = strrchr(mqtt_data, '/'); // Only consider filename after last backslash prevent change of urls having "-" in it
|
char *bch = strrchr(mqtt_data, '/'); // Only consider filename after last backslash prevent change of urls having "-" in it
|
||||||
char *pch = strrchr((bch != nullptr) ? bch : mqtt_data, '-'); // Change from filename-DE.bin into filename-minimal.bin
|
char *pch = strrchr((bch != nullptr) ? bch : mqtt_data, '-'); // Change from filename-DE.bin into filename-minimal.bin
|
||||||
// char *ech = strrchr((bch != nullptr) ? bch : mqtt_data, '.'); // Change from filename.bin into filename-minimal.bin
|
char *ech = strrchr((bch != nullptr) ? bch : mqtt_data, '.'); // Find file type (none, .bin or .bin.gz)
|
||||||
char *ech = strchr((bch != nullptr) ? bch : mqtt_data, '.'); // Change from filename.bin into filename-minimal.bin or filename.bin.gz into filename-minimal.bin.gz
|
if ((ech != nullptr) && (0 == strncasecmp_P(ech, PSTR(".GZ"), 3))) {
|
||||||
if (!pch) { pch = ech; }
|
char *fch = ech;
|
||||||
|
*fch = '\0';
|
||||||
|
ech = strrchr((bch != nullptr) ? bch : mqtt_data, '.'); // Find file type .bin.gz
|
||||||
|
*fch = '.';
|
||||||
|
}
|
||||||
|
char ota_url_type[strlen(ech) +1];
|
||||||
|
strncpy(ota_url_type, ech, sizeof(ota_url_type)); // Either nothing, .bin or .bin.gz
|
||||||
|
if (pch == nullptr) { pch = ech; }
|
||||||
if (pch) {
|
if (pch) {
|
||||||
mqtt_data[pch - mqtt_data] = '\0';
|
mqtt_data[pch - mqtt_data] = '\0';
|
||||||
// char *ech = strrchr(SettingsText(SET_OTAURL), '.'); // Change from filename.bin into filename-minimal.bin
|
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s-" D_JSON_MINIMAL "%s"), mqtt_data, ota_url_type); // Minimal filename must be filename-minimal
|
||||||
char *ech = strchr(SettingsText(SET_OTAURL), '.'); // Change from filename.bin into filename-minimal.bin
|
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s-" D_JSON_MINIMAL "%s"), mqtt_data, ech); // Minimal filename must be filename-minimal
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // FIRMWARE_MINIMAL
|
#endif // FIRMWARE_MINIMAL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user