diff --git a/posix-configs/posixtest/init/rc.S b/posix-configs/posixtest/init/rc.S index bc4b6a4b61..5e408cd544 100644 --- a/posix-configs/posixtest/init/rc.S +++ b/posix-configs/posixtest/init/rc.S @@ -4,6 +4,10 @@ barosim start adcsim start accelsim start gyrosim start +param set CAL_GYRO0_ID 2293760 +param set CAL_ACC0_ID 1310720 +param set CAL_ACC1_ID 1376256 +param set CAL_MAG0_ID 196608 rgbled start mavlink start sensors start diff --git a/src/platforms/posix/drivers/accelsim/accelsim.cpp b/src/platforms/posix/drivers/accelsim/accelsim.cpp index 97314ab846..704c7fc088 100644 --- a/src/platforms/posix/drivers/accelsim/accelsim.cpp +++ b/src/platforms/posix/drivers/accelsim/accelsim.cpp @@ -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); diff --git a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp b/src/platforms/posix/drivers/gyrosim/gyrosim.cpp index c39ebeac0f..a984a310a2 100644 --- a/src/platforms/posix/drivers/gyrosim/gyrosim.cpp +++ b/src/platforms/posix/drivers/gyrosim/gyrosim.cpp @@ -782,6 +782,8 @@ GYROSIM::self_test() int GYROSIM::accel_self_test() { + return OK; + if (self_test()) return 1; @@ -807,6 +809,8 @@ GYROSIM::accel_self_test() int GYROSIM::gyro_self_test() { + return OK; + if (self_test()) return 1;