mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
This commit is contained in:
@@ -503,7 +503,6 @@ void MyESP::_ota_setup() {
|
|||||||
_deferredReset(500, CUSTOM_RESET_OTA);
|
_deferredReset(500, CUSTOM_RESET_OTA);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
ArduinoOTA.onProgress([this](unsigned int progress, unsigned int total) {
|
ArduinoOTA.onProgress([this](unsigned int progress, unsigned int total) {
|
||||||
static unsigned int _progOld;
|
static unsigned int _progOld;
|
||||||
unsigned int _prog = (progress / (total / 100));
|
unsigned int _prog = (progress / (total / 100));
|
||||||
@@ -512,7 +511,6 @@ void MyESP::_ota_setup() {
|
|||||||
_progOld = _prog;
|
_progOld = _prog;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
ArduinoOTA.onError([this](ota_error_t error) {
|
ArduinoOTA.onError([this](ota_error_t error) {
|
||||||
if (error == OTA_AUTH_ERROR)
|
if (error == OTA_AUTH_ERROR)
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ char * _bool_to_char(char * s, uint8_t value) {
|
|||||||
// negative values are assumed stored as 1-compliment (https://medium.com/@LeeJulija/how-integers-are-stored-in-memory-using-twos-complement-5ba04d61a56c)
|
// negative values are assumed stored as 1-compliment (https://medium.com/@LeeJulija/how-integers-are-stored-in-memory-using-twos-complement-5ba04d61a56c)
|
||||||
char * _short_to_char(char * s, int16_t value, uint8_t decimals = 1) {
|
char * _short_to_char(char * s, int16_t value, uint8_t decimals = 1) {
|
||||||
// remove errors or invalid values
|
// remove errors or invalid values
|
||||||
if (value == EMS_VALUE_SHORT_NOTSET) {
|
if ((value == EMS_VALUE_SHORT_NOTSET) || (value == 0x8000)) {
|
||||||
strlcpy(s, "?", 10);
|
strlcpy(s, "?", 10);
|
||||||
return (s);
|
return (s);
|
||||||
}
|
}
|
||||||
@@ -216,7 +216,7 @@ char * _short_to_char(char * s, int16_t value, uint8_t decimals = 1) {
|
|||||||
// decimals: 0 = no division, 1=divide value by 10, 2=divide by 2, 10=divide value by 100
|
// decimals: 0 = no division, 1=divide value by 10, 2=divide by 2, 10=divide value by 100
|
||||||
char * _ushort_to_char(char * s, uint16_t value, uint8_t decimals = 1) {
|
char * _ushort_to_char(char * s, uint16_t value, uint8_t decimals = 1) {
|
||||||
// remove errors or invalid values
|
// remove errors or invalid values
|
||||||
if (value == EMS_VALUE_USHORT_NOTSET) {
|
if ((value == EMS_VALUE_USHORT_NOTSET) || (value == 0x8000)) {
|
||||||
strlcpy(s, "?", 10);
|
strlcpy(s, "?", 10);
|
||||||
return (s);
|
return (s);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define APP_NAME "EMS-ESP"
|
#define APP_NAME "EMS-ESP"
|
||||||
#define APP_VERSION "1.8.1b12"
|
#define APP_VERSION "1.8.1b13"
|
||||||
#define APP_HOSTNAME "ems-esp"
|
#define APP_HOSTNAME "ems-esp"
|
||||||
|
|||||||
Reference in New Issue
Block a user