mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 02:43:33 +08:00
temperature_calibration: notify system about param changes
This commit is contained in:
@@ -46,6 +46,8 @@
|
|||||||
#include <px4_tasks.h>
|
#include <px4_tasks.h>
|
||||||
#include <drivers/drv_hrt.h>
|
#include <drivers/drv_hrt.h>
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "temperature_calibration.h"
|
#include "temperature_calibration.h"
|
||||||
#include "accel.h"
|
#include "accel.h"
|
||||||
@@ -168,6 +170,11 @@ void TemperatureCalibration::task_main()
|
|||||||
calibrators[i]->reset_calibration();
|
calibrators[i]->reset_calibration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure the system updates the changed parameters
|
||||||
|
param_notify_changes();
|
||||||
|
|
||||||
|
usleep(300000); // wait a bit for the system to apply the parameters
|
||||||
|
|
||||||
hrt_abstime next_progress_output = hrt_absolute_time() + 1e6;
|
hrt_abstime next_progress_output = hrt_absolute_time() + 1e6;
|
||||||
|
|
||||||
while (!_force_task_exit) {
|
while (!_force_task_exit) {
|
||||||
|
|||||||
Reference in New Issue
Block a user