Chat app update, EspNow v2 & GPS Info (#460)

This commit is contained in:
Shadowtrance
2026-01-27 02:32:57 +10:00
committed by GitHub
parent dfe2c865d1
commit 10381b10cd
18 changed files with 1547 additions and 124 deletions
@@ -36,6 +36,7 @@ bool isEnabled() {
if (service != nullptr) {
return service->isEnabled();
} else {
LOGGER.error("Service not found");
return false;
}
}
@@ -79,6 +80,21 @@ void unsubscribeReceiver(ReceiverSubscription subscription) {
}
}
uint32_t getVersion() {
auto service = findService();
if (service != nullptr) {
return service->getVersion();
}
LOGGER.error("Service not found");
return 0;
}
size_t getMaxDataLength() {
auto v = getVersion();
if (v == 0) return 0;
return v >= 2 ? MAX_DATA_LEN_V2 : MAX_DATA_LEN_V1;
}
}
#endif // CONFIG_SOC_WIFI_SUPPORTED && !CONFIG_SLAVE_SOC_WIFI_SUPPORTED