Add setup page for device registration and configuration

- Created a new HTML file for device setup with a form for API URL and registration code.
- Implemented JavaScript for handling registration and displaying status messages.
- Updated upgrade and WiFi pages to include navigation to the new setup page.
- Refactored display functions to improve readability and consistency.
- Replaced occurrences of `oledShowMessage` with `oledDisplayText` for uniformity.
- Updated WebSocket handling in the upgrade and WiFi pages for better connection management.
- Adjusted delays in various functions to use `pdMS_TO_TICKS` for better timing accuracy.
- Removed unused routes and cleaned up the website code for improved maintainability.
This commit is contained in:
Manuel Weiser committed 2026-02-19 11:40:42 +01:00
1 parent 1d0b01ba6e
commit 823d1f8c7e
15 files changed
+163 -447

No files matched your search

+2 -2
View File
@@ -167,7 +167,7 @@ void scale_loop(void * parameter) {
if (scaleTareRequest == true || (autoTare && scale_tare_counter >= 20))
{
Serial.println("Re-Tare scale");
oledShowMessage("TARE Scale");
oledDisplayText("TARE Scale");
vTaskDelay(pdMS_TO_TICKS(1000));
scale.tare();
resetWeightFilter(); // Reset filter after manual tare
@@ -382,7 +382,7 @@ uint8_t calibrate_scale() {
{
Serial.println("HX711 not found.");
oledShowMessage("HX711 not found");
oledDisplayText("HX711 not found");
for (uint16_t i = 0; i < 30000; i++) {
yield();