mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
minor change to serial for 1.5.3
This commit is contained in:
Binary file not shown.
@@ -143,11 +143,6 @@ void MyESP::_wifiCallback(justwifi_messages_t code, char * parameter) {
|
|||||||
|
|
||||||
_wifi_connected = true;
|
_wifi_connected = true;
|
||||||
|
|
||||||
// call any final custom settings
|
|
||||||
if (_wifi_callback) {
|
|
||||||
_wifi_callback();
|
|
||||||
}
|
|
||||||
|
|
||||||
// finally if we don't want Serial anymore, turn it off
|
// finally if we don't want Serial anymore, turn it off
|
||||||
if (!_use_serial) {
|
if (!_use_serial) {
|
||||||
Serial.println("Disabling serial port");
|
Serial.println("Disabling serial port");
|
||||||
@@ -157,6 +152,11 @@ void MyESP::_wifiCallback(justwifi_messages_t code, char * parameter) {
|
|||||||
} else {
|
} else {
|
||||||
Serial.println("Using serial port output");
|
Serial.println("Using serial port output");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// call any final custom settings
|
||||||
|
if (_wifi_callback) {
|
||||||
|
_wifi_callback();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code == MESSAGE_ACCESSPOINT_CREATED) {
|
if (code == MESSAGE_ACCESSPOINT_CREATED) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ Ticker systemCheckTimer;
|
|||||||
#define REGULARUPDATES_TIME 60 // every minute a call is made to fetch data from EMS devices manually
|
#define REGULARUPDATES_TIME 60 // every minute a call is made to fetch data from EMS devices manually
|
||||||
Ticker regularUpdatesTimer;
|
Ticker regularUpdatesTimer;
|
||||||
|
|
||||||
#define LEDCHECK_TIME 1 // every second blink the heartbeat LED
|
#define LEDCHECK_TIME 500 // every 1/2 second blink the heartbeat LED
|
||||||
Ticker ledcheckTimer;
|
Ticker ledcheckTimer;
|
||||||
|
|
||||||
// thermostat scan - for debugging
|
// thermostat scan - for debugging
|
||||||
@@ -941,6 +941,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
|
|||||||
void WIFICallback() {
|
void WIFICallback() {
|
||||||
// This is where we enable the UART service to scan the incoming serial Tx/Rx bus signals
|
// This is where we enable the UART service to scan the incoming serial Tx/Rx bus signals
|
||||||
// This is done after we have a WiFi signal to avoid any resource conflicts
|
// This is done after we have a WiFi signal to avoid any resource conflicts
|
||||||
|
|
||||||
if (myESP.getUseSerial()) {
|
if (myESP.getUseSerial()) {
|
||||||
myDebug("EMS UART disabled when in Serial mode. Use 'set serial off' to change.");
|
myDebug("EMS UART disabled when in Serial mode. Use 'set serial off' to change.");
|
||||||
} else {
|
} else {
|
||||||
@@ -949,6 +950,7 @@ void WIFICallback() {
|
|||||||
// go and find the boiler and thermostat types
|
// go and find the boiler and thermostat types
|
||||||
ems_discoverModels();
|
ems_discoverModels();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the boiler settings and shower settings
|
// Initialize the boiler settings and shower settings
|
||||||
@@ -1141,7 +1143,7 @@ void setup() {
|
|||||||
if (EMSESP_Status.led_gpio != EMS_VALUE_INT_NOTSET) {
|
if (EMSESP_Status.led_gpio != EMS_VALUE_INT_NOTSET) {
|
||||||
pinMode(EMSESP_Status.led_gpio, OUTPUT);
|
pinMode(EMSESP_Status.led_gpio, OUTPUT);
|
||||||
digitalWrite(EMSESP_Status.led_gpio, (EMSESP_Status.led_gpio == LED_BUILTIN) ? HIGH : LOW); // light off. For onboard high=off
|
digitalWrite(EMSESP_Status.led_gpio, (EMSESP_Status.led_gpio == LED_BUILTIN) ? HIGH : LOW); // light off. For onboard high=off
|
||||||
ledcheckTimer.attach(LEDCHECK_TIME, do_ledcheck); // blink heartbeat LED
|
ledcheckTimer.attach_ms(LEDCHECK_TIME, do_ledcheck); // blink heartbeat LED
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for Dallas sensors
|
// check for Dallas sensors
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#define EMSUART_UART 0 // UART 0 - there is only one on the esp8266
|
#define EMSUART_UART 0 // UART 0
|
||||||
#define EMSUART_CONFIG 0x1c // 8N1 (8 bits, no stop bits, 1 parity)
|
#define EMSUART_CONFIG 0x1c // 8N1 (8 bits, no stop bits, 1 parity)
|
||||||
#define EMSUART_BAUD 9600 // uart baud rate for the EMS circuit
|
#define EMSUART_BAUD 9600 // uart baud rate for the EMS circuit
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user