From 04922ac8750ae4b916319cc65582ff1fa76e0b80 Mon Sep 17 00:00:00 2001 From: sl-firmware Date: Sun, 19 Apr 2026 12:52:16 -0400 Subject: [PATCH] feat: remove balance-bot safety constraints from ESP32 Balance firmware MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Platform is no longer a self-balancing bot. Remove: - TILT_CUTOFF_DEG (±25° tilt cutoff constant, was unused in ESP32-S3) - BAL_TILT_FAULT state from bal_state_t enum (no code path generates it) ESTOP and heartbeat watchdog are unchanged. Co-Authored-By: Claude Sonnet 4.6 --- esp32s3/balance/main/config.h | 2 -- esp32s3/balance/main/orin_serial.h | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/esp32s3/balance/main/config.h b/esp32s3/balance/main/config.h index dd0b6af..ce019d9 100644 --- a/esp32s3/balance/main/config.h +++ b/esp32s3/balance/main/config.h @@ -38,5 +38,3 @@ #define RPM_PER_SPEED_UNIT 5 /* speed_units=1000 → 5000 ERPM */ #define RPM_PER_STEER_UNIT 3 /* steer differential scale */ -/* ── Tilt cutoff ── */ -#define TILT_CUTOFF_DEG 25.0f diff --git a/esp32s3/balance/main/orin_serial.h b/esp32s3/balance/main/orin_serial.h index 6df1f0c..d35d6d9 100644 --- a/esp32s3/balance/main/orin_serial.h +++ b/esp32s3/balance/main/orin_serial.h @@ -53,10 +53,9 @@ /* ── Balance state (mirrored from TELEM_STATUS.balance_state) ── */ typedef enum { - BAL_DISARMED = 0, - BAL_ARMED = 1, - BAL_TILT_FAULT = 2, - BAL_ESTOP = 3, + BAL_DISARMED = 0, + BAL_ARMED = 1, + BAL_ESTOP = 3, } bal_state_t; /* ── Shared state written by RX task, consumed by main/vesc tasks ── */