mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
rename reset_tx to init_tx
This commit is contained in:
@@ -141,14 +141,17 @@ void EMSESP::watch_id(uint16_t watch_id) {
|
|||||||
// change the tx_mode
|
// change the tx_mode
|
||||||
// resets all counters and bumps the UART
|
// resets all counters and bumps the UART
|
||||||
// this is called when the tx_mode is persisted in the FS either via Web UI or the console
|
// this is called when the tx_mode is persisted in the FS either via Web UI or the console
|
||||||
void EMSESP::reset_tx() {
|
void EMSESP::init_tx() {
|
||||||
// get the tx_mode
|
// get the tx_mode
|
||||||
uint8_t tx_mode;
|
uint8_t tx_mode;
|
||||||
EMSESP::emsespSettingsService.read([&](EMSESPSettings & settings) { tx_mode = settings.tx_mode; });
|
EMSESP::emsespSettingsService.read([&](EMSESPSettings & settings) { tx_mode = settings.tx_mode; });
|
||||||
|
|
||||||
|
#ifndef EMSESP_FORCE_SERIAL
|
||||||
EMSuart::stop();
|
EMSuart::stop();
|
||||||
EMSuart::start(tx_mode);
|
EMSuart::start(tx_mode);
|
||||||
txservice_.start();
|
#endif
|
||||||
|
|
||||||
|
txservice_.start(); // sends out request to EMS bus for all devices
|
||||||
|
|
||||||
// force a fetch for all new values, unless Tx is set to off
|
// force a fetch for all new values, unless Tx is set to off
|
||||||
if (tx_mode != 0) {
|
if (tx_mode != 0) {
|
||||||
@@ -785,13 +788,12 @@ void EMSESP::start() {
|
|||||||
esp8266React.begin(); // loads system settings (wifi, mqtt, etc)
|
esp8266React.begin(); // loads system settings (wifi, mqtt, etc)
|
||||||
emsespSettingsService.begin(); // load EMS-ESP specific settings
|
emsespSettingsService.begin(); // load EMS-ESP specific settings
|
||||||
// system_.check_upgrade(); // see if we need to migrate from previous versions
|
// system_.check_upgrade(); // see if we need to migrate from previous versions
|
||||||
console_.start(); // telnet and serial console
|
console_.start(); // telnet and serial console
|
||||||
mqtt_.start(); // mqtt init
|
mqtt_.start(); // mqtt init
|
||||||
system_.start(); // starts syslog, uart, sets version, initializes LED. Requires pre-loaded settings.
|
system_.start(); // starts syslog, uart, sets version, initializes LED. Requires pre-loaded settings.
|
||||||
shower_.start(); // initialize shower timer and shower alert
|
shower_.start(); // initialize shower timer and shower alert
|
||||||
txservice_.start(); // sets bus ID, sends out request for EMS devices
|
sensors_.start(); // dallas external sensors
|
||||||
sensors_.start(); // dallas external sensors
|
webServer.begin(); // start web server
|
||||||
webServer.begin(); // start web server
|
|
||||||
|
|
||||||
emsdevices.reserve(5); // reserve space for initially 5 devices to avoid mem
|
emsdevices.reserve(5); // reserve space for initially 5 devices to avoid mem
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ class EMSESP {
|
|||||||
|
|
||||||
static void add_context_menus();
|
static void add_context_menus();
|
||||||
|
|
||||||
static void reset_tx();
|
static void init_tx();
|
||||||
|
|
||||||
static void incoming_telegram(uint8_t * data, const uint8_t length);
|
static void incoming_telegram(uint8_t * data, const uint8_t length);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user