Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Compass: move param to table per instance #19123

Merged
merged 20 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AntennaTracker/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ const AP_Param::Info Tracker::var_info[] = {
// @Path: ../libraries/AP_Baro/AP_Baro.cpp
GOBJECT(barometer, "BARO", AP_Baro),

// @Group: COMPASS_
// @Group: COMPASS
// @Path: ../libraries/AP_Compass/AP_Compass.cpp
GOBJECT(compass, "COMPASS_", Compass),
GOBJECT(compass, "COMPASS", Compass),

// @Group: SCHED_
// @Path: ../libraries/AP_Scheduler/AP_Scheduler.cpp
Expand Down
4 changes: 2 additions & 2 deletions ArduCopter/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ const AP_Param::Info Copter::var_info[] = {
GOBJECT(input_manager, "IM_", AC_InputManager_Heli),
#endif

// @Group: COMPASS_
// @Group: COMPASS
// @Path: ../libraries/AP_Compass/AP_Compass.cpp
GOBJECT(compass, "COMPASS_", Compass),
GOBJECT(compass, "COMPASS", Compass),

// @Group: INS_
// @Path: ../libraries/AP_InertialSensor/AP_InertialSensor.cpp
Expand Down
4 changes: 2 additions & 2 deletions ArduPlane/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,9 @@ const AP_Param::Info Plane::var_info[] = {

// variables not in the g class which contain EEPROM saved variables

// @Group: COMPASS_
// @Group: COMPASS
// @Path: ../libraries/AP_Compass/AP_Compass.cpp
GOBJECT(compass, "COMPASS_", Compass),
GOBJECT(compass, "COMPASS", Compass),

// @Group: SCHED_
// @Path: ../libraries/AP_Scheduler/AP_Scheduler.cpp
Expand Down
4 changes: 2 additions & 2 deletions ArduSub/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ const AP_Param::Info Sub::var_info[] = {
// @Path: ../libraries/AP_Relay/AP_Relay.cpp
GOBJECT(relay, "RELAY_", AP_Relay),

// @Group: COMPASS_
// @Group: COMPASS
// @Path: ../libraries/AP_Compass/AP_Compass.cpp
GOBJECT(compass, "COMPASS_", Compass),
GOBJECT(compass, "COMPASS", Compass),

// @Group: INS_
// @Path: ../libraries/AP_InertialSensor/AP_InertialSensor.cpp
Expand Down
4 changes: 2 additions & 2 deletions Blimp/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ const AP_Param::Info Blimp::var_info[] = {

// variables not in the g class which contain EEPROM saved variables

// @Group: COMPASS_
// @Group: COMPASS
// @Path: ../libraries/AP_Compass/AP_Compass.cpp
GOBJECT(compass, "COMPASS_", Compass),
GOBJECT(compass, "COMPASS", Compass),

// @Group: INS_
// @Path: ../libraries/AP_InertialSensor/AP_InertialSensor.cpp
Expand Down
4 changes: 2 additions & 2 deletions Rover/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ const AP_Param::Info Rover::var_info[] = {

// variables not in the g class which contain EEPROM saved variables

// @Group: COMPASS_
// @Group: COMPASS
// @Path: ../libraries/AP_Compass/AP_Compass.cpp
GOBJECT(compass, "COMPASS_", Compass),
GOBJECT(compass, "COMPASS", Compass),

// @Group: SCHED_
// @Path: ../libraries/AP_Scheduler/AP_Scheduler.cpp
Expand Down
4 changes: 2 additions & 2 deletions Tools/AP_Periph/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ const AP_Param::Info AP_Periph_FW::var_info[] = {
#endif

#ifdef HAL_PERIPH_ENABLE_MAG
// @Group: COMPASS_
// @Group: COMPASS
// @Path: ../libraries/AP_Compass/AP_Compass.cpp
GOBJECT(compass, "COMPASS_", Compass),
GOBJECT(compass, "COMPASS", Compass),
#endif

#ifdef HAL_PERIPH_ENABLE_BARO
Expand Down
6 changes: 3 additions & 3 deletions Tools/LogAnalyzer/tests/TestCompass.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def WARN():
warnOffset = 300
failOffset = 500
param_offsets = (
logdata.parameters["COMPASS_OFS_X"],
logdata.parameters["COMPASS_OFS_Y"],
logdata.parameters["COMPASS_OFS_Z"]
logdata.parameters["COMPASS1_OFS_X"],
logdata.parameters["COMPASS1_OFS_Y"],
logdata.parameters["COMPASS1_OFS_Z"]
)

if vec_len(param_offsets) > failOffset:
Expand Down
4 changes: 2 additions & 2 deletions Tools/Replay/Replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ const AP_Param::Info ReplayVehicle::var_info[] = {
// @Path: ../libraries/AP_NavEKF2/AP_NavEKF2.cpp
GOBJECTN(ekf2, NavEKF2, "EK2_", NavEKF2),

// @Group: COMPASS_
// @Group: COMPASS
// @Path: ../libraries/AP_Compass/AP_Compass.cpp
GOBJECT(compass, "COMPASS_", Compass),
GOBJECT(compass, "COMPASS", Compass),

// @Group: LOG
// @Path: ../libraries/AP_Logger/AP_Logger.cpp
Expand Down
6 changes: 3 additions & 3 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6813,9 +6813,9 @@ def test_ekf_source(self):
self.start_subtest("missing required yaw source")
self.set_parameters({
"EK3_SRC3_YAW": 3, # External Yaw with Compass Fallback
"COMPASS_USE": 0,
"COMPASS_USE2": 0,
"COMPASS_USE3": 0,
"COMPASS1_USE": 0,
"COMPASS2_USE": 0,
"COMPASS3_USE": 0,
})
self.assert_prearm_failure("EK3 sources require Compass")
self.context_pop()
Expand Down
Loading