mirror of https://github.com/arendst/Tasmota.git
Change command FileUpload binary index
This commit is contained in:
parent
b9464a21a8
commit
e9d1e8c725
|
@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Support for GM861 1D and 2D bar code reader (#18399)
|
||||
|
||||
### Breaking Changed
|
||||
- Change command ``FileUpload`` index binary data detection from >199 to >299
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
|||
- Berry `tcpclientasync` class for non-blocking TCP client
|
||||
|
||||
### Breaking Changed
|
||||
- Change command ``FileUpload`` index binary data detection from >199 to >299
|
||||
|
||||
### Changed
|
||||
- ESP32 Framework (Core) from v2.0.7 to v2.0.8
|
||||
|
|
|
@ -408,7 +408,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
|
|||
}
|
||||
type[i] = '\0';
|
||||
|
||||
bool binary_data = (index > 199); // Suppose binary data on topic index > 199
|
||||
bool binary_data = (index > 299); // Suppose binary data on topic index > 299
|
||||
if (!binary_data) {
|
||||
bool keep_spaces = ((strstr_P(type, PSTR("SERIALSEND")) != nullptr) && (index > 9)); // Do not skip leading spaces on (s)serialsend10 and up
|
||||
if (!keep_spaces) {
|
||||
|
|
|
@ -210,7 +210,7 @@ void CmndFileUpload(void) {
|
|||
const char* base64_data = nullptr;
|
||||
uint32_t rcv_id = 0;
|
||||
|
||||
bool binary_data = (XdrvMailbox.index > 199); // Check for raw data
|
||||
bool binary_data = (XdrvMailbox.index > 299); // Check for raw data
|
||||
|
||||
if (!binary_data) {
|
||||
if (strlen(XdrvMailbox.data) > 8) { // Workaround exception if empty JSON like {} - Needs checks
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
* GM861Zone<byte> <value> - Set zone byte to value
|
||||
* GM861Zone5 20 - Set read interval to 2 seconds (default 10 = 0x0A)
|
||||
* GM861Zone44 0x02 - Enable all barcodes using full area (default 5 = 0x05)
|
||||
* GM861Zone208 0x80 - Enable AIM ID (default 0 = 0x00)
|
||||
* GM861Save - Save changes in zone bytes to flash
|
||||
* GM861Reset 1 - Reset to factory settings and re-init the scanner
|
||||
* GM861Dump - Dump zone bytes 0 to 97 if logging level 4
|
||||
|
|
|
@ -158,7 +158,7 @@ while Run_flag:
|
|||
# Message length used by Tasmota (FileTransferHeaderSize)
|
||||
client.publish(mypublish, "{\"Id\":"+str("%3d"%file_id)+",\"Data\":\""+base64_data+"\"}")
|
||||
else:
|
||||
client.publish(mypublish+"201", chunk)
|
||||
client.publish(mypublish+"301", chunk)
|
||||
file_pos = file_pos + file_chunk_size
|
||||
if file_pos % 102400 < file_chunk_size:
|
||||
progress = round((file_pos / 10240)) * 10
|
||||
|
|
|
@ -156,7 +156,7 @@ while Run_flag:
|
|||
# Message length used by Tasmota (FileTransferHeaderSize)
|
||||
client.publish(mypublish, "{\"Id\":"+str("%3d"%file_id)+",\"Data\":\""+base64_data+"\"}")
|
||||
else:
|
||||
client.publish(mypublish+"201", chunk)
|
||||
client.publish(mypublish+"301", chunk)
|
||||
Ack_flag = True
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue