Add HW revision to mDNS for updates

This commit is contained in:
Djuri Baars 2024-05-18 23:00:08 +02:00
parent ef7d629e8c
commit 858241bd57
3 changed files with 12 additions and 2 deletions

View file

@ -716,4 +716,12 @@ void setupFrontlight()
// }
flArray.allOFF();
}
#endif
#endif
String getHwRev() {
#ifndef HW_REV
return "REV_0";
#else
return HW_REV;
#endif
}

View file

@ -62,4 +62,5 @@ void improv_set_state(improv::State state);
void improv_send_response(std::vector<uint8_t> &response);
void improv_set_error(improv::Error error);
void WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info);
void WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info);
String getHwRev();

View file

@ -94,6 +94,7 @@ void setupWebserver() {
MDNS.addServiceTxt("http", "tcp", "model", "BTClock");
MDNS.addServiceTxt("http", "tcp", "version", "3.0");
MDNS.addServiceTxt("http", "tcp", "rev", GIT_REV);
MDNS.addServiceTxt("http", "tcp", "hw_rev", getHwRev());
}
xTaskCreate(eventSourceTask, "eventSourceTask", 4096, NULL, tskIDLE_PRIORITY,