From 5302464f79a5d52f497062d4cf211c2199616089 Mon Sep 17 00:00:00 2001 From: osiu97 Date: Wed, 8 Jul 2026 20:04:02 +0200 Subject: [PATCH] compile bug --- src/main.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index cb44761..673a197 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -78,6 +78,18 @@ unsigned long lastMotorActive = 0; const unsigned long IDLE_TIMEOUT_MS = 30 * 60 * 1000; // 30 minutes bool motorsDisabled = true; // Assume disabled at startup until moved +// ─── Homing State Machine ───────────────────────────────────────── +enum HomingState { + HOME_IDLE, + HOME_ALL_PHASE1, + HOME_ALL_PHASE2, + HOME_1_PHASE1, + HOME_1_PHASE2, + HOME_2_PHASE1, + HOME_2_PHASE2 +}; +HomingState homingState = HOME_IDLE; + // ─── Forward declarations ───────────────────────────────────────── void parseCommand(const String &cmd); void sendPosition(); @@ -280,17 +292,6 @@ void setup() { } // ─── Loop ───────────────────────────────────────────────────────── -// ─── Homing State Machine ───────────────────────────────────────── -enum HomingState { - HOME_IDLE, - HOME_ALL_PHASE1, - HOME_ALL_PHASE2, - HOME_1_PHASE1, - HOME_1_PHASE2, - HOME_2_PHASE1, - HOME_2_PHASE2 -}; -HomingState homingState = HOME_IDLE; void loop() { stepper1.run();