mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Update mw.c
do not include serial nor telemetry handler in cycletime calculation
This commit is contained in:
parent
d25564e26b
commit
ea3f4cc3e4
1 changed files with 2 additions and 2 deletions
4
src/mw.c
4
src/mw.c
|
@ -824,12 +824,12 @@ void loop(void)
|
||||||
loopTime = currentTime + mcfg.looptime;
|
loopTime = currentTime + mcfg.looptime;
|
||||||
|
|
||||||
computeIMU();
|
computeIMU();
|
||||||
annexCode();
|
|
||||||
// Measure loop rate just afer reading the sensors
|
// Measure loop rate just afer reading the sensors
|
||||||
currentTime = micros();
|
currentTime = micros();
|
||||||
cycleTime = (int32_t)(currentTime - previousTime);
|
cycleTime = (int32_t)(currentTime - previousTime);
|
||||||
previousTime = currentTime;
|
previousTime = currentTime;
|
||||||
|
// non IMU critical, temeperatur, serialcom
|
||||||
|
annexCode();
|
||||||
#ifdef MAG
|
#ifdef MAG
|
||||||
if (sensors(SENSOR_MAG)) {
|
if (sensors(SENSOR_MAG)) {
|
||||||
if (abs(rcCommand[YAW]) < 70 && f.MAG_MODE) {
|
if (abs(rcCommand[YAW]) < 70 && f.MAG_MODE) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue