mirror of
https://github.com/gosticks/growme.git
synced 2025-10-16 11:45:38 +00:00
fix: remove sema for bt operation
This commit is contained in:
parent
2726e1fc3d
commit
9f2ae4c30f
@ -139,12 +139,12 @@ void motorTask(void *pvParameter) {
|
||||
// NOTE: maybe adjust speed here
|
||||
m->stepper->startMove(diff);
|
||||
|
||||
xSemaphoreTake(bin_sem, portMAX_DELAY);
|
||||
// xSemaphoreTake(bin_sem, portMAX_DELAY);
|
||||
if (runningMotors == 0) {
|
||||
digitalWrite(M_ENABLE_PIN, LOW);
|
||||
}
|
||||
runningMotors++;
|
||||
xSemaphoreGive(bin_sem);
|
||||
// xSemaphoreGive(bin_sem);
|
||||
|
||||
while (true) {
|
||||
// motor control loop - send pulse and return how long to wait until next pulse
|
||||
@ -161,12 +161,12 @@ void motorTask(void *pvParameter) {
|
||||
}
|
||||
}
|
||||
m->updateCurrentPosition(ongoingStepTarget);
|
||||
xSemaphoreTake(bin_sem, portMAX_DELAY);
|
||||
// xSemaphoreTake(bin_sem, portMAX_DELAY);
|
||||
runningMotors--;
|
||||
if (runningMotors == 0) {
|
||||
digitalWrite(M_ENABLE_PIN, HIGH);
|
||||
}
|
||||
xSemaphoreGive(bin_sem);
|
||||
// xSemaphoreGive(bin_sem);
|
||||
}
|
||||
|
||||
vTaskDelay(noActionIdleTime);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user