From 32247823fd852df2ea3bb7d50a64804251e2996c Mon Sep 17 00:00:00 2001 From: nick Date: Thu, 4 Jun 2026 03:16:18 -0600 Subject: [PATCH] Clean up generic project branding and relay fields --- docs/hardware-bringup-checklist.md | 2 +- .../overland-controller/overland-controller.ino | 14 +++++++------- firmware/esp32/overland-controller/relays.cpp | 4 ++-- firmware/esp32/overland-controller/relays.h | 4 ++-- firmware/esp32/overland-controller/sensors.h | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/hardware-bringup-checklist.md b/docs/hardware-bringup-checklist.md index 4b5b731..8f44b37 100644 --- a/docs/hardware-bringup-checklist.md +++ b/docs/hardware-bringup-checklist.md @@ -21,7 +21,7 @@ Verify ESP32 creates AP: -* SSID: XterraController +* SSID: OverlandController ### HTTP API diff --git a/firmware/esp32/overland-controller/overland-controller.ino b/firmware/esp32/overland-controller/overland-controller.ino index dc476b3..f41d14f 100644 --- a/firmware/esp32/overland-controller/overland-controller.ino +++ b/firmware/esp32/overland-controller/overland-controller.ino @@ -109,8 +109,8 @@ void buildStatusDocument(JsonDocument& doc) { sensorHealth["outside"] = sensors.outsideAirOnline; JsonObject relayObj = doc.createNestedObject("relays"); - relayObj["starlink"] = relays.starlink; - relayObj["fridge"] = relays.fridge; + relayObj["starlink"] = relays.relay1; + relayObj["fridge"] = relays.relay2; JsonObject vehicle = doc.createNestedObject("vehicle"); vehicle["ignition_on"] = digitalRead(IGNITION_PIN); @@ -185,9 +185,9 @@ void sendError(Stream& output, const char* message) { bool setRelayByName(const char* relayName, bool enabled) { if (strcmp(relayName, "starlink") == 0) { - relays.starlink = enabled; + relays.relay1 = enabled; } else if (strcmp(relayName, "fridge") == 0) { - relays.fridge = enabled; + relays.relay2 = enabled; } else { return false; } @@ -626,9 +626,9 @@ void handleGenericRelayRoute() { } if (relayId == "relay_1") { - relays.starlink = enabled; + relays.relay1 = enabled; } else if (relayId == "relay_2") { - relays.fridge = enabled; + relays.relay2 = enabled; } else { server.send(404, "application/json", "{\"ok\":false,\"error\":\"unknown_relay\"}"); return; @@ -719,7 +719,7 @@ void setup() { WiFi.mode(WIFI_AP); - bool apResult = WiFi.softAP("XterraController"); + bool apResult = WiFi.softAP("OverlandController"); if (apResult) { Serial.println("AP Started"); diff --git a/firmware/esp32/overland-controller/relays.cpp b/firmware/esp32/overland-controller/relays.cpp index e89dcf8..ada295e 100644 --- a/firmware/esp32/overland-controller/relays.cpp +++ b/firmware/esp32/overland-controller/relays.cpp @@ -12,6 +12,6 @@ void initRelays() { } void updateRelayOutputs() { - digitalWrite(RELAY_STARLINK_PIN, relays.starlink); - digitalWrite(RELAY_FRIDGE_PIN, relays.fridge); + digitalWrite(RELAY_STARLINK_PIN, relays.relay1); + digitalWrite(RELAY_FRIDGE_PIN, relays.relay2); } diff --git a/firmware/esp32/overland-controller/relays.h b/firmware/esp32/overland-controller/relays.h index c1dfb95..735510e 100644 --- a/firmware/esp32/overland-controller/relays.h +++ b/firmware/esp32/overland-controller/relays.h @@ -1,8 +1,8 @@ #pragma once struct RelayState { - bool starlink = false; - bool fridge = false; + bool relay1 = false; + bool relay2 = false; }; extern RelayState relays; diff --git a/firmware/esp32/overland-controller/sensors.h b/firmware/esp32/overland-controller/sensors.h index 9400b6e..eb9ff7c 100644 --- a/firmware/esp32/overland-controller/sensors.h +++ b/firmware/esp32/overland-controller/sensors.h @@ -6,8 +6,8 @@ struct SensorData { float rearSeat = -127.0; float outsideAir = -127.0; - bool fridgeZone1Online = false; - bool fridgeZone2Online = false; + bool relay2Zone1Online = false; + bool relay2Zone2Online = false; bool rearSeatOnline = false; bool outsideAirOnline = false; };