mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 04:43:34 +08:00
temperature_calibration: fix poll (number of fds), remove usleep
useep() is not needed because we use the poll()
This commit is contained in:
@@ -176,7 +176,7 @@ void Tempcal::task_main()
|
|||||||
//uint16_t l = 0;
|
//uint16_t l = 0;
|
||||||
|
|
||||||
while (!_task_should_exit) {
|
while (!_task_should_exit) {
|
||||||
int ret = px4_poll(fds, sizeof(fds) / sizeof(fds[0]), 1000);
|
int ret = px4_poll(fds, num_gyro, 1000);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
// Poll error, sleep and try again
|
// Poll error, sleep and try again
|
||||||
@@ -316,7 +316,6 @@ void Tempcal::task_main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
usleep(100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned i = 0; i < num_gyro; i++) {
|
for (unsigned i = 0; i < num_gyro; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user