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 committed 2012-08-11 22:06:03 +10:00
1 parent f5b7ae213c
commit 3bdc7d41be
2 files changed
+3 -1

No files matched your search

+2
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),
+1 -1
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),