mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 17:53:38 +08:00
Posix: make simulated devices always pass self tests
To facilitate testing, the simulated devices always return OK for self tests. rc.S was also upated to set CAL_XXXY_ID to the devid so tests pass the calibration check. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -707,6 +707,9 @@ ACCELSIM::ioctl(device::px4_dev_handle_t *handlep, int cmd, unsigned long arg)
|
||||
memcpy((struct accel_scale *) arg, &_accel_scale, sizeof(_accel_scale));
|
||||
return OK;
|
||||
|
||||
case ACCELIOCSELFTEST:
|
||||
return OK;
|
||||
|
||||
default:
|
||||
/* give it to the superclass */
|
||||
return VDev::ioctl(handlep, cmd, arg);
|
||||
@@ -824,6 +827,8 @@ ACCELSIM::mag_ioctl(device::px4_dev_handle_t *handlep, int cmd, unsigned long ar
|
||||
*/
|
||||
return 0;
|
||||
|
||||
case MAGIOCSELFTEST:
|
||||
return OK;
|
||||
default:
|
||||
/* give it to the superclass */
|
||||
return VDev::ioctl(handlep, cmd, arg);
|
||||
|
||||
Reference in New Issue
Block a user