mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
SITL: add parameters to control reading and writing IMU data to a file
add exit on stop to reading IMU data from a file
This commit is contained in:
parent
5ea3415a41
commit
ec7be5c417
@ -525,7 +525,11 @@ const AP_Param::GroupInfo SIM::var_ins[] = {
|
|||||||
// @DisplayName: SIM-on_hardware Output Enable Mask
|
// @DisplayName: SIM-on_hardware Output Enable Mask
|
||||||
// @Description: channels which are passed through to actual hardware when running on actual hardware
|
// @Description: channels which are passed through to actual hardware when running on actual hardware
|
||||||
AP_GROUPINFO("OH_MASK", 28, SIM, on_hardware_output_enable_mask, 0),
|
AP_GROUPINFO("OH_MASK", 28, SIM, on_hardware_output_enable_mask, 0),
|
||||||
|
#if AP_SIM_INS_FILE_ENABLED
|
||||||
|
// read and write IMU data to/from files
|
||||||
|
AP_GROUPINFO("GYR_FILE_RW", 29, SIM, gyro_file_rw, INSFileMode::INS_FILE_NONE),
|
||||||
|
AP_GROUPINFO("ACC_FILE_RW", 30, SIM, accel_file_rw, INSFileMode::INS_FILE_NONE),
|
||||||
|
#endif
|
||||||
// the IMUT parameters must be last due to the enable parameters
|
// the IMUT parameters must be last due to the enable parameters
|
||||||
#if HAL_INS_TEMPERATURE_CAL_ENABLE
|
#if HAL_INS_TEMPERATURE_CAL_ENABLE
|
||||||
AP_SUBGROUPINFO(imu_tcal[0], "IMUT1_", 61, SIM, AP_InertialSensor::TCal),
|
AP_SUBGROUPINFO(imu_tcal[0], "IMUT1_", 61, SIM, AP_InertialSensor::TCal),
|
||||||
|
@ -506,6 +506,17 @@ public:
|
|||||||
|
|
||||||
// Master instance to use servos from with slave instances
|
// Master instance to use servos from with slave instances
|
||||||
AP_Int8 ride_along_master;
|
AP_Int8 ride_along_master;
|
||||||
|
|
||||||
|
#if AP_SIM_INS_FILE_ENABLED
|
||||||
|
enum INSFileMode {
|
||||||
|
INS_FILE_NONE = 0,
|
||||||
|
INS_FILE_READ = 1,
|
||||||
|
INS_FILE_WRITE = 2,
|
||||||
|
INS_FILE_READ_STOP_ON_EOF = 3,
|
||||||
|
};
|
||||||
|
AP_Int8 gyro_file_rw;
|
||||||
|
AP_Int8 accel_file_rw;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace SITL
|
} // namespace SITL
|
||||||
|
Loading…
Reference in New Issue
Block a user