fix double homing
This commit is contained in:
+2
-1
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user