mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Removing test code.
This commit is contained in:
@@ -71,6 +71,7 @@ set(config_module_list
|
|||||||
modules/commander
|
modules/commander
|
||||||
modules/controllib
|
modules/controllib
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Libraries
|
# Libraries
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -230,19 +230,19 @@ extern "C" {
|
|||||||
|
|
||||||
int px4_ioctl(int fd, int cmd, unsigned long arg)
|
int px4_ioctl(int fd, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
|
PX4_DEBUG("px4_ioctl fd = %d", fd);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
VDev *dev = get_vdev(fd);
|
VDev *dev = get_vdev(fd);
|
||||||
|
|
||||||
if (dev) {
|
if (dev) {
|
||||||
ret = dev->ioctl(filemap[fd], cmd, arg);
|
ret = dev->ioctl(filemap[fd], cmd, arg);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
PX4_ERR("px4_ioctl: vdev handle not available, file handle: %d", fd);
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
PX4_ERR("px4_ioctl: call failed: %d", ret);
|
|
||||||
px4_errno = -ret;
|
px4_errno = -ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,9 +305,6 @@ extern "C" {
|
|||||||
fd_pollable = true;
|
fd_pollable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
PX4_DEBUG("vdev invalid, index: %d, name: %s, handle: 0x%X", i, thread_name, fds[i].fd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If any FD can be polled, lock the semaphore and
|
// If any FD can be polled, lock the semaphore and
|
||||||
|
|||||||
@@ -2155,26 +2155,15 @@ Sensors::task_main()
|
|||||||
|
|
||||||
_gyro_count = init_sensor_class(ORB_ID(sensor_gyro), &_gyro_sub[0],
|
_gyro_count = init_sensor_class(ORB_ID(sensor_gyro), &_gyro_sub[0],
|
||||||
&raw.gyro_priority[0], &raw.gyro_errcount[0]);
|
&raw.gyro_priority[0], &raw.gyro_errcount[0]);
|
||||||
warnx("gyro: sub: 0x%X, priority: 0x%X, error count: 0x%X",
|
|
||||||
_gyro_sub[0], raw.gyro_priority[0], raw.gyro_errcount[0]);
|
|
||||||
|
|
||||||
_mag_count = init_sensor_class(ORB_ID(sensor_mag), &_mag_sub[0],
|
_mag_count = init_sensor_class(ORB_ID(sensor_mag), &_mag_sub[0],
|
||||||
&raw.magnetometer_priority[0], &raw.magnetometer_errcount[0]);
|
&raw.magnetometer_priority[0], &raw.magnetometer_errcount[0]);
|
||||||
warnx("mag: sub: 0x%X, priority: 0x%X, error count: 0x%X",
|
|
||||||
_mag_sub[0], raw.magnetometer_priority[0], raw.magnetometer_errcount[0]);
|
|
||||||
|
|
||||||
_accel_count = init_sensor_class(ORB_ID(sensor_accel), &_accel_sub[0],
|
_accel_count = init_sensor_class(ORB_ID(sensor_accel), &_accel_sub[0],
|
||||||
&raw.accelerometer_priority[0], &raw.accelerometer_errcount[0]);
|
&raw.accelerometer_priority[0], &raw.accelerometer_errcount[0]);
|
||||||
warnx("gyro: sub: 0x%X, priority: 0x%X, error count: 0x%X",
|
|
||||||
_accel_sub[0], raw.accelerometer_priority[0], raw.accelerometer_errcount[0]);
|
|
||||||
|
|
||||||
_baro_count = init_sensor_class(ORB_ID(sensor_baro), &_baro_sub[0],
|
_baro_count = init_sensor_class(ORB_ID(sensor_baro), &_baro_sub[0],
|
||||||
&raw.baro_priority[0], &raw.baro_errcount[0]);
|
&raw.baro_priority[0], &raw.baro_errcount[0]);
|
||||||
warnx("gyro: sub: 0x%X, priority: 0x%X, error count: 0x%X",
|
|
||||||
_baro_sub[0], raw.baro_priority[0], raw.baro_errcount[0]);
|
|
||||||
|
|
||||||
warnx("subscription counts: gyro: %d, mag: %d, accel: %d, baro: %d", _gyro_count, _mag_count,
|
|
||||||
_accel_count, _baro_count);
|
|
||||||
|
|
||||||
if (gcount_prev != _gyro_count ||
|
if (gcount_prev != _gyro_count ||
|
||||||
mcount_prev != _mag_count ||
|
mcount_prev != _mag_count ||
|
||||||
@@ -2185,9 +2174,6 @@ Sensors::task_main()
|
|||||||
parameter_update_poll(true);
|
parameter_update_poll(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
warnx("counts: gyro: %d, mag: %d, accel: %d, baro: %d", _gyro_count, _mag_count,
|
|
||||||
_accel_count, _baro_count);
|
|
||||||
|
|
||||||
_rc_sub = orb_subscribe(ORB_ID(input_rc));
|
_rc_sub = orb_subscribe(ORB_ID(input_rc));
|
||||||
_diff_pres_sub = orb_subscribe(ORB_ID(differential_pressure));
|
_diff_pres_sub = orb_subscribe(ORB_ID(differential_pressure));
|
||||||
_vcontrol_mode_sub = orb_subscribe(ORB_ID(vehicle_control_mode));
|
_vcontrol_mode_sub = orb_subscribe(ORB_ID(vehicle_control_mode));
|
||||||
|
|||||||
Reference in New Issue
Block a user