mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
(v2) add GPIOs to WebUI as configurable options (LED, Rx, Tx, Dallas sensor) #466
This commit is contained in:
@@ -142,14 +142,15 @@ void EMSESP::watch_id(uint16_t watch_id) {
|
||||
// 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
|
||||
void EMSESP::init_tx() {
|
||||
// get the 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::start(tx_mode);
|
||||
EMSuart::stop();
|
||||
EMSuart::start(tx_mode, settings.rx_gpio, settings.tx_gpio);
|
||||
#endif
|
||||
});
|
||||
|
||||
txservice_.start(); // sends out request to EMS bus for all devices
|
||||
|
||||
|
||||
Reference in New Issue
Block a user