Skip to content

Commit eb411c0

Browse files
committed
fixing serial device bug for sending MQTT commands
1 parent 0aaaa94 commit eb411c0

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

OTGW-Core.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,9 +768,9 @@ uint16_t print_daytime()
768768
int sendOTGW(const char* buf, int len)
769769
{
770770
//Send the buffer to OTGW when the Serial interface is available
771-
if (Serial) {
771+
if (OTGWSerial.availableForWrite()>=len+2) {
772772
//check the write buffer
773-
Debugf("Serial Write Buffer space = [%d] - needed [%d]\r\n",OTGWSerial.availableForWrite(), (len+2));
773+
//Debugf("Serial Write Buffer space = [%d] - needed [%d]\r\n",OTGWSerial.availableForWrite(), (len+2));
774774
DebugT("Sending to Serial [");
775775
for (int i = 0; i < len; i++) {
776776
Debug((char)buf[i]);

OTGW-ModUpdateServer-impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void ESP8266HTTPUpdateServerTemplate<ServerType>::setup(ESP8266WebServerTemplate
122122
size_t fsSize = ((size_t) &_FS_end - (size_t) &_FS_start);
123123
close_all_fs();
124124
if (!Update.begin(fsSize, U_FS)){//start with max available size
125-
if (_serial_output) Update.printError(Serial);
125+
if (_serial_output) Update.printError(OTGWSerial);
126126
}
127127
} else {
128128
uint32_t maxSketchSpace = (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000;
@@ -169,7 +169,7 @@ void ESP8266HTTPUpdateServerTemplate<ServerType>::setSuccessPage(const char *suc
169169
template <typename ServerType>
170170
void ESP8266HTTPUpdateServerTemplate<ServerType>::_setUpdaterError()
171171
{
172-
if (_serial_output) Update.printError(Serial);
172+
if (_serial_output) Update.printError(OTGWSerial);
173173
StreamString str;
174174
Update.printError(str);
175175
_updaterError = str.c_str();

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Looking for the documentation, go here (work in progress): <br> https://github.
4646

4747
| Version | Release notes |
4848
|-|-|
49+
| 0.7.7 | UI improved: Only show updates values in web UI <br> Bugifx: Serial not found error when sending commands thru MQTT fixed |
4950
| 0.7.6 | PIC firmware integration done. <br> New setting: NTP configurable <br> New setting: heartbeat led on/off <br> Update to REST API to include epoch of last update to message|
5051
| 0.7.5 | Complete set of status bits in UI and Central Heating 2 information |
5152
| 0.7.4 | Integration of the otgw-pic firmware upgrade code - upgrade to pic firmware version 5.0 (by Schelte Bron) |

version.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
//The version number conforms to semver.org format
22
#define _VERSION_MAJOR 0
33
#define _VERSION_MINOR 7
4-
#define _VERSION_PATCH 6
5-
#define _VERSION_BUILD 688
4+
#define _VERSION_PATCH 7
5+
#define _VERSION_BUILD 691
66
//#define _VERSION_PRERELEASE beta //uncomment to define prerelease labels: alpha - beta - rc
7-
#define _VERSION_DATE "22-02-2021"
8-
#define _VERSION_TIME "08:10:13"
9-
#define _SEMVER_CORE "0.7.6"
10-
#define _SEMVER_BUILD "0.7.6+688"
11-
#define _SEMVER_FULL "0.7.6+688"
12-
#define _SEMVER_NOBUILD "0.7.6 (22-02-2021)"
13-
#define _VERSION "0.7.6+688 (22-02-2021)"
7+
#define _VERSION_DATE "24-02-2021"
8+
#define _VERSION_TIME "08:13:20"
9+
#define _SEMVER_CORE "0.7.7"
10+
#define _SEMVER_BUILD "0.7.7+691"
11+
#define _SEMVER_FULL "0.7.7+691"
12+
#define _SEMVER_NOBUILD "0.7.7 (24-02-2021)"
13+
#define _VERSION "0.7.7+691 (24-02-2021)"
1414
//The version information is created automatically, more information here: https://github.com/rvdbreemen/autoinc-semver

0 commit comments

Comments
 (0)