INS: disable INS AP_Param table when not on APM1 hardware

this could cause overwriting of memory with default values
This commit is contained in:
Andrew Tridgell 2012-08-11 17:12:09 +10:00
parent 3a92509b18
commit 35c88dd418
2 changed files with 3 additions and 1 deletions

View File

@ -309,7 +309,9 @@ const AP_Param::Info var_info[] PROGMEM = {
// @Group: INS_
// @Path: ../libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp
#if HIL_MODE == HIL_MODE_DISABLED && CONFIG_APM_HARDWARE == APM_HARDWARE_APM1
GOBJECT(ins, "INS_", AP_InertialSensor_Oilpan),
#endif
GOBJECT(gcs0, "SR0_", GCS_MAVLINK),
GOBJECT(gcs3, "SR3_", GCS_MAVLINK),

View File

@ -524,7 +524,7 @@ const AP_Param::Info var_info[] PROGMEM = {
GOBJECT(gcs0, "SR0_", GCS_MAVLINK),
GOBJECT(gcs3, "SR3_", GCS_MAVLINK),
#if HIL_MODE == HIL_MODE_DISABLED
#if HIL_MODE == HIL_MODE_DISABLED && CONFIG_APM_HARDWARE == APM_HARDWARE_APM1
// @Group: INS_
// @Path: ../libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp
GOBJECT(ins, "INS_", AP_InertialSensor_Oilpan),