mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 01:03:33 +08:00
sensors: Remove unneeded orb_set_interval() call
This commit is contained in:
@@ -1291,6 +1291,9 @@ Sensors::parameter_update_poll(bool forced)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int id = h.ioctl(DEVIOCGDEVICEID, 0);
|
||||||
|
PX4_WARN("sensors: device ID: %s: %d, %u", str, id, (unsigned)id);
|
||||||
|
|
||||||
/* if the calibration is for this device, apply it */
|
/* if the calibration is for this device, apply it */
|
||||||
if (device_id == h.ioctl(DEVIOCGDEVICEID, 0)) {
|
if (device_id == h.ioctl(DEVIOCGDEVICEID, 0)) {
|
||||||
struct gyro_scale gscale = {};
|
struct gyro_scale gscale = {};
|
||||||
@@ -1360,6 +1363,9 @@ Sensors::parameter_update_poll(bool forced)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int id = h.ioctl(DEVIOCGDEVICEID, 0);
|
||||||
|
PX4_WARN("sensors: device ID: %s: %d, %u", str, id, (unsigned)id);
|
||||||
|
|
||||||
/* if the calibration is for this device, apply it */
|
/* if the calibration is for this device, apply it */
|
||||||
if (device_id == h.ioctl(DEVIOCGDEVICEID, 0)) {
|
if (device_id == h.ioctl(DEVIOCGDEVICEID, 0)) {
|
||||||
struct accel_scale gscale = {};
|
struct accel_scale gscale = {};
|
||||||
@@ -1438,6 +1444,9 @@ Sensors::parameter_update_poll(bool forced)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int id = h.ioctl(DEVIOCGDEVICEID, 0);
|
||||||
|
PX4_WARN("sensors: device ID: %s: %d, %u", str, id, (unsigned)id);
|
||||||
|
|
||||||
/* if the calibration is for this device, apply it */
|
/* if the calibration is for this device, apply it */
|
||||||
if (device_id == h.ioctl(DEVIOCGDEVICEID, 0)) {
|
if (device_id == h.ioctl(DEVIOCGDEVICEID, 0)) {
|
||||||
struct mag_scale gscale = {};
|
struct mag_scale gscale = {};
|
||||||
@@ -2102,9 +2111,6 @@ Sensors::task_main()
|
|||||||
_rc_parameter_map_sub = orb_subscribe(ORB_ID(rc_parameter_map));
|
_rc_parameter_map_sub = orb_subscribe(ORB_ID(rc_parameter_map));
|
||||||
_manual_control_sub = orb_subscribe(ORB_ID(manual_control_setpoint));
|
_manual_control_sub = orb_subscribe(ORB_ID(manual_control_setpoint));
|
||||||
|
|
||||||
/* rate limit vehicle status updates to 5Hz */
|
|
||||||
orb_set_interval(_vcontrol_mode_sub, 200);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* do advertisements
|
* do advertisements
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user