diff --git a/src/helpers/ManagementReporter.cpp b/src/helpers/ManagementReporter.cpp index 12408f8f3..678aa5b2a 100644 --- a/src/helpers/ManagementReporter.cpp +++ b/src/helpers/ManagementReporter.cpp @@ -37,9 +37,9 @@ struct ManagementReporter::Working { ManagementReporter::ManagementReporter(Mesh& mesh, MainBoard& board, SensorManager& sensors, ClientACL& acl, NodePrefs& prefs, CommonCLICallbacks& callbacks, - CommonCLI& cli, FILESYSTEM* fs) + CommonCLI& common_cli, FILESYSTEM* fs) : mesh(mesh), board(board), sensors(sensors), acl(acl), prefs(prefs), - callbacks(callbacks), cli(cli), fs(fs) { + callbacks(callbacks), common_cli(common_cli), fs(fs) { last_ms = millis(); healthy = load(); if (healthy && enabled && !allocate()) healthy = false; } @@ -72,7 +72,7 @@ bool ManagementReporter::load() { read32(b + 104) > 90 * DAY + 3600 || read32(b + 108) > 90 * DAY + 3600) continue; enabled = b[4]; direct_days = b[5]; keyed = b[6]; flood_days = legacy ? (direct_days < 21 ? 21 : direct_days) : b[7]; - if (legacy && b[7] != OUT_PATH_UNKNOWN) cli.adoptLegacyDataTxPath(b + 8, b[7]); + if (legacy && b[7] != OUT_PATH_UNKNOWN) common_cli.adoptLegacyDataTxPath(b + 8, b[7]); memcpy(key, b + 72, 32); schedule.direct = read32(b + 104); schedule.flood = read32(b + 108); if (!direct_days) schedule.direct = 0; @@ -206,10 +206,10 @@ void ManagementReporter::start(bool flood) { w.route_path_len = OUT_PATH_UNKNOWN; memset(w.route_path, 0, sizeof(w.route_path)); if (flood) { - if (!cli.resolveDataTxScope(w.scope)) return; + if (!common_cli.resolveDataTxScope(w.scope)) return; } else { const uint8_t* configured = nullptr; - if (!cli.getDataTxPath(configured, w.route_path_len)) return; + if (!common_cli.getDataTxPath(configured, w.route_path_len)) return; if (w.route_path_len & 63) { Packet::copyPath(w.route_path, configured, w.route_path_len); } @@ -279,7 +279,7 @@ void ManagementReporter::loop(uint64_t node_uptime_seconds) { // due, the scoped flood replaces the redundant direct transmission. if (flood_days && !schedule.flood) start(true); if (!w.sending && direct_days - && cli.getDataTxPath(route_path, route_path_len) && !schedule.direct) { + && common_cli.getDataTxPath(route_path, route_path_len) && !schedule.direct) { start(false); } } @@ -289,8 +289,8 @@ bool ManagementReporter::command(char* command, char* reply, size_t size) { if (!strcmp(command, "get mgmt")) { const uint8_t* route_path = nullptr; uint8_t route_path_len = OUT_PATH_UNKNOWN; TransportKey scope; - const bool routed = cli.getDataTxPath(route_path, route_path_len); - const bool scoped = cli.resolveDataTxScope(scope); + const bool routed = common_cli.getDataTxPath(route_path, route_path_len); + const bool scoped = common_cli.resolveDataTxScope(scope); char direct[12], flood[12]; if (direct_days) snprintf(direct, sizeof(direct), "%ud", direct_days); else strcpy(direct, "off"); @@ -324,8 +324,8 @@ bool ManagementReporter::command(char* command, char* reply, size_t size) { const uint8_t* route_path = nullptr; uint8_t route_path_len = OUT_PATH_UNKNOWN; TransportKey scope; const bool direct_ready = !direct_days - || cli.getDataTxPath(route_path, route_path_len); - const bool flood_ready = !flood_days || cli.resolveDataTxScope(scope); + || common_cli.getDataTxPath(route_path, route_path_len); + const bool flood_ready = !flood_days || common_cli.resolveDataTxScope(scope); if (on && (!keyed || (!direct_days && !flood_days) || !direct_ready || !flood_ready || !allocate())) { snprintf(reply, size, "ERR: password, enabled route(s), data.tx path/region and free RAM required"); @@ -346,7 +346,7 @@ bool ManagementReporter::command(char* command, char* reply, size_t size) { char* end; const unsigned long n = strtoul(value, &end, 10); const uint8_t* route_path = nullptr; uint8_t route_path_len = OUT_PATH_UNKNOWN; if (!*value || *end || !Schedule::validDirect(n) - || !cli.getDataTxPath(route_path, route_path_len)) { + || !common_cli.getDataTxPath(route_path, route_path_len)) { snprintf(reply, size, "ERR: direct needs data.tx path and 5..90 days"); return true; } direct_days = n; schedule.direct = direct_days * DAY; @@ -361,7 +361,7 @@ bool ManagementReporter::command(char* command, char* reply, size_t size) { char* end; const unsigned long n = strtoul(value, &end, 10); TransportKey scope; if (!*value || *end || !Schedule::validFlood(n) - || !cli.resolveDataTxScope(scope)) { + || !common_cli.resolveDataTxScope(scope)) { snprintf(reply, size, "ERR: flood needs data.tx region and 21..90 days"); return true; } flood_days = n; schedule.flood = flood_days * DAY; @@ -371,8 +371,8 @@ bool ManagementReporter::command(char* command, char* reply, size_t size) { const uint8_t* route_path = nullptr; uint8_t route_path_len = OUT_PATH_UNKNOWN; TransportKey scope; if (!*value || *end || !Schedule::validDirect(n) - || !cli.getDataTxPath(route_path, route_path_len) - || !cli.resolveDataTxScope(scope)) { + || !common_cli.getDataTxPath(route_path, route_path_len) + || !common_cli.resolveDataTxScope(scope)) { snprintf(reply, size, "ERR: interval needs path, region and 5..90 days"); return true; } // Compatibility shorthand: configure both schedules together. diff --git a/src/helpers/ManagementReporter.h b/src/helpers/ManagementReporter.h index 1e118fadf..d6bcc7d48 100644 --- a/src/helpers/ManagementReporter.h +++ b/src/helpers/ManagementReporter.h @@ -19,7 +19,7 @@ class ManagementReporter { ClientACL& acl; NodePrefs& prefs; CommonCLICallbacks& callbacks; - CommonCLI& cli; + CommonCLI& common_cli; FILESYSTEM* fs; Working* work = nullptr; uint8_t key[32] = {}; @@ -39,7 +39,7 @@ class ManagementReporter { public: ManagementReporter(Mesh& mesh, MainBoard& board, SensorManager& sensors, ClientACL& acl, NodePrefs& prefs, - CommonCLICallbacks& callbacks, CommonCLI& cli, + CommonCLICallbacks& callbacks, CommonCLI& common_cli, FILESYSTEM* fs); ~ManagementReporter(); void loop(uint64_t node_uptime_seconds = UINT64_MAX); diff --git a/src/helpers/esp32/WebConfigHtml.h b/src/helpers/esp32/WebConfigHtml.h index aa9c66470..982223338 100644 --- a/src/helpers/esp32/WebConfigHtml.h +++ b/src/helpers/esp32/WebConfigHtml.h @@ -1,14 +1,14 @@ // Auto-generated by scripts/generate_webconfig_html.py from webui/index.html // DO NOT EDIT - edit webui/index.html instead. -// build-inputs-sha256: 0c35c588ba2eee1d34eeb57500849b0202e5918c2046c631bb32d766163cea1d +// build-inputs-sha256: 1071187333a4001364aa2461e355e609ee1d48d9ca10643fcc4cc82f09bb0ca2 #pragma once #include #include const uint32_t WEBCONFIG_HTML_RAW_LEN = 116713; const uint32_t WEBCONFIG_HTML_GZ_LEN = 34649; -const char WEBCONFIG_HTML_ETAG[] = "\"7078446d9b9a0c1a\""; -const char WEBCONFIG_HTML_VERSION[] = "98b2af65071702d0"; +const char WEBCONFIG_HTML_ETAG[] = "\"3da507b3043c6666\""; +const char WEBCONFIG_HTML_VERSION[] = "2b1f5aea9e6d7af0"; const uint16_t WEBCONFIG_HTML_LOADER_LEN = 762; const uint8_t WEBCONFIG_HTML_LOADER[] PROGMEM = { 0x3c,0x21,0x64,0x6f,0x63,0x74,0x79,0x70,0x65,0x20,0x68,0x74,0x6d,0x6c,0x3e,0x3c, @@ -32,8 +32,8 @@ const uint8_t WEBCONFIG_HTML_LOADER[] PROGMEM = { 0x6d,0x65,0x6f,0x75,0x74,0x28,0x28,0x29,0x3d,0x3e,0x63,0x2e,0x61,0x62,0x6f,0x72, 0x74,0x28,0x29,0x2c,0x39,0x30,0x30,0x30,0x30,0x29,0x3b,0x74,0x72,0x79,0x7b,0x63, 0x6f,0x6e,0x73,0x74,0x20,0x72,0x3d,0x61,0x77,0x61,0x69,0x74,0x20,0x66,0x65,0x74, - 0x63,0x68,0x28,0x22,0x2f,0x75,0x69,0x3f,0x76,0x3d,0x39,0x38,0x62,0x32,0x61,0x66, - 0x36,0x35,0x30,0x37,0x31,0x37,0x30,0x32,0x64,0x30,0x22,0x2c,0x63,0x3f,0x7b,0x73, + 0x63,0x68,0x28,0x22,0x2f,0x75,0x69,0x3f,0x76,0x3d,0x32,0x62,0x31,0x66,0x35,0x61, + 0x65,0x61,0x39,0x65,0x36,0x64,0x37,0x61,0x66,0x30,0x22,0x2c,0x63,0x3f,0x7b,0x73, 0x69,0x67,0x6e,0x61,0x6c,0x3a,0x63,0x2e,0x73,0x69,0x67,0x6e,0x61,0x6c,0x7d,0x3a, 0x7b,0x7d,0x29,0x3b,0x69,0x66,0x28,0x72,0x2e,0x6f,0x6b,0x29,0x70,0x3d,0x61,0x77, 0x61,0x69,0x74,0x20,0x72,0x2e,0x74,0x65,0x78,0x74,0x28,0x29,0x3b,0x65,0x6c,0x73, @@ -62,7 +62,7 @@ const uint8_t WEBCONFIG_HTML_LOADER[] PROGMEM = { }; const uint8_t WEBCONFIG_HTML_GZ[] PROGMEM = { - 0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0x0a,0xec,0xbd,0x69,0x7b,0xdb,0x48, + 0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x02,0x03,0xec,0xbd,0x69,0x7b,0xdb,0x48, 0x92,0x20,0xfc,0x5d,0xbf,0x02,0x86,0x6b,0x24,0xa2,0x04,0x42,0xbc,0x24,0xcb,0xa4, 0x29,0xad,0x4a,0xb6,0xbb,0x3c,0xe5,0x6b,0x24,0xb9,0xab,0x66,0x55,0x6a,0x2f,0x48, 0x82,0x22,0x5a,0x20,0x80,0x02,0x40,0x1d,0x45,0xe9,0xfd,0xed,0x6f,0x1c,0x99,0x40,