From fa8cc741418c7ca7251ad278c6a7fda119eed28a Mon Sep 17 00:00:00 2001 From: Jm Date: Sun, 17 Jan 2021 15:40:25 -0800 Subject: [PATCH] Update to Serial Plugin to make it easy to override the device configuration --- src/plugins/SerialPlugin.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/plugins/SerialPlugin.cpp b/src/plugins/SerialPlugin.cpp index 236b29f94..7e764ee8b 100644 --- a/src/plugins/SerialPlugin.cpp +++ b/src/plugins/SerialPlugin.cpp @@ -66,6 +66,17 @@ char serialStringChar[Constants_DATA_PAYLOAD_LEN]; int32_t SerialPlugin::runOnce() { #ifndef NO_ESP32 + + /* + Uncomment the preferences below if you want to use the plugin + without having to configure it from the PythonAPI or WebUI. + */ + + // radioConfig.preferences.serialplugin_enabled = 1; + // radioConfig.preferences.serialplugin_rxd = 35; + // radioConfig.preferences.serialplugin_txd = 15; + // radioConfig.preferences.serialplugin_timeout = 1000; + if (radioConfig.preferences.serialplugin_enabled) { if (firstTime) { @@ -147,8 +158,8 @@ bool SerialPluginRadio::handleReceived(const MeshPacket &mp) if (radioConfig.preferences.serialplugin_enabled) { auto &p = mp.decoded.data; - // DEBUG_MSG("Received text msg self=0x%0x, from=0x%0x, to=0x%0x, id=%d, msg=%.*s\n", nodeDB.getNodeNum(), - // mp.from, mp.to, mp.id, p.payload.size, p.payload.bytes); + // DEBUG_MSG("Received text msg self=0x%0x, from=0x%0x, to=0x%0x, id=%d, msg=%.*s\n", + // nodeDB.getNodeNum(), mp.from, mp.to, mp.id, p.payload.size, p.payload.bytes); if (mp.from == nodeDB.getNodeNum()) {