mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-13 03:19:58 +03:00
Prevent MSP from hogging the CPU.
This commit is contained in:
parent
916aa60254
commit
e7cac196a1
1 changed files with 3 additions and 2 deletions
|
@ -760,7 +760,7 @@ static bool processOutCommand(uint8_t cmdMSP)
|
||||||
break;
|
break;
|
||||||
case MSP_RAW_IMU:
|
case MSP_RAW_IMU:
|
||||||
headSerialReply(18);
|
headSerialReply(18);
|
||||||
// Retarded hack until multiwiidorks start using real units for sensor data
|
// Hack due to choice of units for sensor data in multiwii
|
||||||
if (acc_1G > 1024) {
|
if (acc_1G > 1024) {
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
serialize16(accSmooth[i] / 8);
|
serialize16(accSmooth[i] / 8);
|
||||||
|
@ -982,7 +982,7 @@ static bool processOutCommand(uint8_t cmdMSP)
|
||||||
serialize8(GPS_svinfo_svid[i]);
|
serialize8(GPS_svinfo_svid[i]);
|
||||||
serialize8(GPS_svinfo_quality[i]);
|
serialize8(GPS_svinfo_quality[i]);
|
||||||
serialize8(GPS_svinfo_cno[i]);
|
serialize8(GPS_svinfo_cno[i]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case MSP_DEBUG:
|
case MSP_DEBUG:
|
||||||
|
@ -1469,6 +1469,7 @@ static void mspProcessPort(void)
|
||||||
tailSerialReply();
|
tailSerialReply();
|
||||||
}
|
}
|
||||||
currentPort->c_state = IDLE;
|
currentPort->c_state = IDLE;
|
||||||
|
break; // process one command so as not to block.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue