refactor: remove unused code from firmware, portal and build scripts

Remove the unused sensor connection getter, slug prefix and suffix helpers, UTC conversion and array formatting routines. Drop unused shared strings and the CONFIG_URL macro.

Remove setupUpgradeForm from the shared browser bundle. The upgrade page registers its own submit handler.

Delete the obsolete Python gzip packer and its import. Gulp handles compression when building the web assets.
This commit is contained in:
Yurii committed 2026-11-22 03:27:25 +03:00
1 parent 3a530d721e
commit 9ff1bd14f5
6 files changed
-262

No files matched your search

-36
View File
@@ -489,14 +489,6 @@ public:
return updated;
}
static bool getConnectionStatusById(const uint8_t sensorId) {
std::lock_guard<std::mutex> lock(mutex);
if (settings == nullptr || results == nullptr || !isValidSensorId(sensorId)) {
return false;
}
return results[sensorId].connected;
}
static bool setConnectionStatusById(const uint8_t sensorId, const bool status, const bool updateActivityAt = true) {
char name[sizeof(Settings::name)];
bool changed;
@@ -729,34 +721,6 @@ public:
return result;
}
static std::string makeSlugWithSuffix(std::string_view value, std::string_view suffix, char separator = '_') {
std::string result;
result.reserve(value.size() + 1 + suffix.size());
makeSlug(result, value, separator);
result += separator;
result.append(suffix);
return result;
}
static std::string& makeSlugWithSuffix(std::string& result, std::string_view value, std::string_view suffix, char separator = '_') {
result = makeSlugWithSuffix(value, suffix, separator);
return result;
}
static std::string makeSlugWithPrefix(std::string_view value, std::string_view prefix, char separator = '_') {
std::string result;
result.reserve(prefix.size() + 1 + value.size());
makeSlug(result, value, separator);
result.insert(0, 1, separator);
result.insert(0, prefix);
return result;
}
static std::string& makeSlugWithPrefix(std::string& result, std::string_view value, std::string_view prefix, char separator = '_') {
result = makeSlugWithPrefix(value, prefix, separator);
return result;
}
static uint8_t bluetoothRssiToQuality(int rssi) {
return constrain(map(rssi, -110, -50, 0, 100), 0, 100);;
}