mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 09:16:07 +03:00
Set default acc rate to 1000Hz, for all targets
This commit is contained in:
parent
f1fc190e5b
commit
4a769eb55f
2 changed files with 13 additions and 13 deletions
|
@ -690,19 +690,19 @@ void main_init(void)
|
|||
rescheduleTask(TASK_GYROPID, gyro.targetLooptime);
|
||||
setTaskEnabled(TASK_GYROPID, true);
|
||||
|
||||
if(sensors(SENSOR_ACC)) {
|
||||
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):
|
||||
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):
|
||||
case 1000:
|
||||
#ifdef STM32F10X
|
||||
accTargetLooptime = 3000;
|
||||
accTargetLooptime = 1000;
|
||||
#else
|
||||
accTargetLooptime = 1000;
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@ cfTask_t cfTasks[TASK_COUNT] = {
|
|||
[TASK_ACCEL] = {
|
||||
.taskName = "ACCEL",
|
||||
.taskFunc = taskUpdateAccelerometer,
|
||||
.desiredPeriod = 1000000 / 100, // every 10ms
|
||||
.desiredPeriod = 1000000 / 1000, // every 1ms
|
||||
.staticPriority = TASK_PRIORITY_MEDIUM,
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue