mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Improved acc initialisation
This commit is contained in:
parent
9b565384f8
commit
c077bacee6
7 changed files with 82 additions and 65 deletions
|
@ -683,22 +683,7 @@ void main_init(void)
|
|||
|
||||
if (sensors(SENSOR_ACC)) {
|
||||
setTaskEnabled(TASK_ACCEL, true);
|
||||
switch (gyro.targetLooptime) { // Switch statement kept in place to change acc rates in the future
|
||||
case 500:
|
||||
case 375:
|
||||
case 250:
|
||||
case 125:
|
||||
accTargetLooptime = 1000;
|
||||
break;
|
||||
default:
|
||||
case 1000:
|
||||
#ifdef STM32F10X
|
||||
accTargetLooptime = 1000;
|
||||
#else
|
||||
accTargetLooptime = 1000;
|
||||
#endif
|
||||
}
|
||||
rescheduleTask(TASK_ACCEL, accTargetLooptime);
|
||||
rescheduleTask(TASK_ACCEL, accSamplingInterval);
|
||||
}
|
||||
|
||||
setTaskEnabled(TASK_ATTITUDE, sensors(SENSOR_ACC));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue