Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
https://github.com/proddy/EMS-ESP/issues/146
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Jul 6, 2019
1 parent 9c9f277 commit 3d66c58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/MyESP/MyESP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ void MyESP::_ota_setup() {
_deferredReset(500, CUSTOM_RESET_OTA);
});

/*
ArduinoOTA.onProgress([this](unsigned int progress, unsigned int total) {
static unsigned int _progOld;
unsigned int _prog = (progress / (total / 100));
Expand All @@ -512,8 +511,7 @@ void MyESP::_ota_setup() {
_progOld = _prog;
}
});
*/


ArduinoOTA.onError([this](ota_error_t error) {
if (error == OTA_AUTH_ERROR)
myDebug_P(PSTR("[OTA] Auth Failed"));
Expand Down
4 changes: 2 additions & 2 deletions src/ems-esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
char * _short_to_char(char * s, int16_t value, uint8_t decimals = 1) {
// remove errors or invalid values
if (value == EMS_VALUE_SHORT_NOTSET) {
if ((value == EMS_VALUE_SHORT_NOTSET) || (value == 0x8000)) {
strlcpy(s, "?", 10);
return (s);
}
Expand Down Expand Up @@ -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
char * _ushort_to_char(char * s, uint16_t value, uint8_t decimals = 1) {
// remove errors or invalid values
if (value == EMS_VALUE_USHORT_NOTSET) {
if ((value == EMS_VALUE_USHORT_NOTSET) || (value == 0x8000)) {
strlcpy(s, "?", 10);
return (s);
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
#pragma once

#define APP_NAME "EMS-ESP"
#define APP_VERSION "1.8.1b12"
#define APP_VERSION "1.8.1b13"
#define APP_HOSTNAME "ems-esp"

0 comments on commit 3d66c58

Please sign in to comment.