diff --git a/src/main/main.c b/src/main/main.c index 586f682c5e..0ce5ef6558 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -668,14 +668,6 @@ int main(void) { rescheduleTask(TASK_GYROPID, targetLooptime); setTaskEnabled(TASK_GYROPID, true); - setTaskEnabled(TASK_MOTOR, true); - - if (feature(FEATURE_ONESHOT125)) { - rescheduleTask(TASK_MOTOR, constrain(lrintf((1.0f / masterConfig.motor_pwm_rate) * 1000000), 250, 3500)); - } else { - rescheduleTask(TASK_MOTOR, 1000); - } - if(sensors(SENSOR_ACC)) { setTaskEnabled(TASK_ACCEL, true); switch(targetLooptime) { // Switch statement kept in place to change acc rates in the future @@ -732,6 +724,10 @@ int main(void) { #ifdef TRANSPONDER setTaskEnabled(TASK_TRANSPONDER, feature(FEATURE_TRANSPONDER)); #endif +#ifdef USE_BST + setTaskEnabled(TASK_BST_READ_WRITE, true); + setTaskEnabled(TASK_BST_MASTER_PROCESS, true); +#endif while (1) { scheduler(); diff --git a/src/main/mw.c b/src/main/mw.c index 867a0c324b..dae33bc959 100644 --- a/src/main/mw.c +++ b/src/main/mw.c @@ -766,6 +766,7 @@ void taskMainPidLoopCheck(void) { static uint8_t pidUpdateCountdown; if (runTaskMainSubprocesses) { + taskMotorUpdate(); subTasksMainPidLoop(); runTaskMainSubprocesses = false; } diff --git a/src/main/scheduler.h b/src/main/scheduler.h index af789c5c48..f91bca78a3 100755 --- a/src/main/scheduler.h +++ b/src/main/scheduler.h @@ -44,7 +44,6 @@ typedef enum { /* Actual tasks */ TASK_SYSTEM = 0, TASK_GYROPID, - TASK_MOTOR, TASK_ATTITUDE, TASK_ACCEL, TASK_SERIAL, diff --git a/src/main/scheduler_tasks.c b/src/main/scheduler_tasks.c index e14ddd980c..a937537c45 100644 --- a/src/main/scheduler_tasks.c +++ b/src/main/scheduler_tasks.c @@ -23,7 +23,6 @@ #include "scheduler.h" void taskMainPidLoopCheck(void); -void taskMotorUpdate(void); void taskUpdateAccelerometer(void); void taskHandleSerial(void); void taskUpdateAttitude(void); @@ -59,13 +58,6 @@ cfTask_t cfTasks[TASK_COUNT] = { .subTaskName = "GYRO", .taskFunc = taskMainPidLoopCheck, .desiredPeriod = 1000, - .staticPriority = TASK_PRIORITY_HIGH, - }, - - [TASK_MOTOR] = { - .taskName = "MOTOR", - .taskFunc = taskMotorUpdate, - .desiredPeriod = 1000, .staticPriority = TASK_PRIORITY_REALTIME, },