(v2) add GPIOs to WebUI as configurable options (LED, Rx, Tx, Dallas sensor) #466

This commit is contained in:
proddy
2020-08-29 15:16:19 +02:00
parent 844267eeef
commit 24d5da36a6
16 changed files with 142 additions and 73 deletions

View File

@@ -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