fix double homing

This commit is contained in:
osiu97
2026-07-08 20:02:46 +02:00
parent 136ef8b721
commit 92522a341b
+2 -1
View File
@@ -219,9 +219,10 @@ void parseCommand(const String &cmd) {
void sendPosition() {
if (!bleConnected || !pStatusChar)
return;
bool isHolding = !motorsDisabled || stepper1.isRunning() || stepper2.isRunning() || homingState != HOME_IDLE;
String pos = "P:" + String(stepper1.currentPosition()) + "," +
String(stepper2.currentPosition()) + "," +
String(motorsDisabled ? 0 : 1);
String(isHolding ? 1 : 0);
pStatusChar->setValue(pos.c_str());
pStatusChar->notify();
Serial.printf("[POS] %s\n", pos.c_str());