Commit Graph

999 Commits

Author SHA1 Message Date
Peter Barker 1abce258e4 AP_Compass: mark all_external as used even if it is not 2023-02-22 19:40:13 +11:00
Peter Barker 430f19222a AP_Compass: don't define driver backend type if it is not compiled in
Catches places where code isn't disabled properly
2023-02-22 19:40:13 +11:00
Peter Barker 7d244e3451 AP_Compass: add and use AP_COMPASS_LIS3MDL_ENABLED 2023-02-17 23:05:48 +11:00
Peter Barker fe9461242e AP_Compass: add and use AP_COMPASS_LSM9DS1_ENABLED 2023-02-15 20:03:55 +11:00
Peter Barker b26d771c9f AP_Compass: add and use AP_COMPASS_IST8310_ENABLED 2023-02-14 12:23:55 +11:00
Peter Barker 9035de80ca AP_Compass: do not detect extra bmm150 instances on SkyViper-v2450 2023-02-09 17:52:52 +11:00
Peter Barker feb809fbb7 AP_Compass: add and use AP_COMPASS_BMM150_ENABLED 2023-02-09 17:52:52 +11:00
Peter Barker 22feb3c08a AP_Compass: add and use AP_COMPASS_AK8963_ENABLED 2023-02-07 10:21:06 +11:00
Peter Barker 8155e0ab3b AP_Compass: avoid using struct Location
clang reports this could be a problem when compiling under some EABIs.  Remove it from most places as it is just noise, replace with class where we want to avoid including Location.h
2023-02-04 22:51:54 +11:00
Peter Barker ff99ff34c7 AP_Compass: add and use AP_COMPASS_HMC5843_ENABLED 2023-02-01 18:47:37 +11:00
Peter Barker 669ce03de3 AP_Compass: make DRIVER_IST8308 an invalid symbol if not compiled in 2023-01-31 11:08:28 +11:00
Peter Barker cbd1264f90 AP_Compass: add and use AP_COMPASS_LSM303D_ENABLED 2023-01-31 11:08:28 +11:00
Andrew Tridgell 07d56d83e7 AP_Compass: allow enabling of only some ExternalAHRS sensors 2023-01-30 09:22:02 +11:00
Peter Barker e60e646a4e AP_Compass: create and use AP_COMPASS_IST8308_ENABLED 2023-01-25 19:58:02 +11:00
Andrew Tridgell f203cf321f AP_Compass: fixed field orientation for MMC3416
the sensor is not FRD, and needs Y axis reversed to follow ArduPilot
FRD convention for magnetometers
2023-01-23 20:10:16 +11:00
Andrew Tridgell 863b4bf928 AP_Compass: fixed zero compass diagonals
this fixes a regression from 4.2 to 4.3.

previously we automatically set the diagnoals to 1,1,1 if they were
0,0,0. We don't do that any more. I was helping a user who had copied
an old config with 0,0,0 for diagonals and did not understand two
things:

- the compass did not work in 4.3
- large vehicle mag cal didn't work
2023-01-17 12:05:19 +11:00
Peter Barker c0d9201740 AP_Compass: rename HAL_INS_ENABLED to AP_INERTIALSENSOR_ENABLED 2023-01-03 10:28:42 +11:00
Peter Barker 3adbaddab0 AP_Compass: regularise compass defines
start to make compass backends look like backends from our other libraries
2022-11-15 16:44:38 +11:00
Peter Barker aef745c693 AP_Compass: fix compilation when removing diagonals state 2022-11-09 21:14:04 +11:00
Peter Barker 35afd258ca AP_Compass: change namespace of MultiCopter and FixedWing params
this stops the libraries knowing anything about AP_Vehicle
2022-11-09 19:04:37 +11:00
Peter Barker 2f29dd9b18 AP_Compass: include cleanups 2022-11-08 09:49:19 +11:00
bugobliterator 61e2e8cd3d AP_Compass: add option to skip auto detect internal mag 2022-11-01 10:41:59 +11:00
Peter Barker dc85169cb1 AP_Compass: send report if we are in the BAD_RADIUS state 2022-10-06 10:31:09 +11:00
Peter Barker 05a638a639 AP_Compass: correct is_calibrating check
before this we only ever looked at the first backend
2022-10-06 08:21:03 +11:00
Peter Barker 75919171b7 AP_Compass: remove default clause from calibrator status switch
bad_radius should almost certainly be treated just like bad orientation
2022-10-06 08:21:03 +11:00
Peter Barker d6c5a0ab2b AP_Compass: correct compilation when COMPASS_MAX_INSTANCE>1 and no diagonals 2022-10-06 08:21:03 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
Andrew Tridgell 0b9769e658 AP_Compass: removed diagonals and offdiagonals on AP_Periph 2022-09-30 21:25:36 +10:00
Andrew Tridgell af224dab1e AP_Compass: fixed AP_Periph compass
diagonals are no longer initialised to 1.0, which leaves us with zero
compass after matrix mul
2022-09-30 21:25:36 +10:00
Iampete1 df470f6a34 AP_Compass: params always use set method 2022-08-03 13:43:48 +01:00
Andrew Tridgell b6bcd6346d AP_Compass: switch to a general method of heater compensation
this allows any board to easily setup heater compensation for an
internal compass. The offsets are in body frame (previously in sensor
frame) and are sensor specific using bus device IDs
2022-08-02 17:26:46 +10:00
Iampete1 cdf930effe AP_Compass: defualt diagonals vector to 1.0 2022-07-28 16:51:33 +10:00
Henry Wurzburg 4c44b6ad1a AP_Compass: expand description of custom orientation parameters 2022-07-21 15:45:28 +01:00
Peter Barker 16ea4f03b6 AP_Compass: fix clang++ warnings on static inits
these are static variables so don't need zeroing anyway...
2022-06-28 10:20:30 +10:00
Andrew Tridgell 4d031a0c9e AP_Compass: HAL_COMPASS_DISABLE_IST8310_INTERNAL_PROBE for Pixhawk6C 2022-06-23 12:37:24 +10:00
Andrew Tridgell e48f405c08 AP_Compass: removed "AK09916 Wrong id" message
we don't need this on every board that doesn't have an I2C AK09916
2022-06-23 12:37:24 +10:00
Ruffalo-sunghwan 499c5dfc96 AP_Compass : correct comment spelling 2022-05-24 20:27:45 +09:00
murata a19d4b65fc AP_Compass: Console output can be disabled 2022-05-17 09:53:06 +10:00
Peter Barker 437b313544 AP_Compass: do not use GSF if any model has been clipped 2022-05-11 17:45:47 +10:00
Peter Barker 3ec0e27e4f AP_Compass: move logging of compass ERR flags into AP_Compass 2022-05-10 19:46:40 +10:00
Peter Barker 57f8b7c2a8 AP_Compass: split AP_HAL_SITL and AP_SIM_ENABLED 2022-03-17 14:39:55 +11:00
Michael du Breuil 041b2b594b AP_Compass: Fix compass priority instance message to make sense to users 2022-03-08 10:32:05 +11:00
Iampete1 6c48c346c1 AP_Compass: convert param to new custom rotation 2022-03-02 18:16:42 +11:00
Iampete1 209ad965be AP_Compass: remove custom rotations 2022-03-02 18:16:42 +11:00
Peter Barker 7d3f3b6888 AP_Compass: include cleanups 2022-03-01 11:21:33 +11:00
Joshua Henderson dc8df8f147 AP_Compass: add define for COMPASS_ENABLE 2022-02-08 10:41:02 +11:00
Peter Barker ef2fd1f4ba AP_Compass: remove HAL_COMPASS_DEFAULT define
this doesn't actually allow you to specify a default, despite the name
and a couple of hwdefs trying to use it that way.

This would have stopped being useful when we did the
compass-prority-table stuff - or before.
2022-02-01 12:10:38 +11:00
Peter Barker 38abec2133 AP_Compass: rename AP_AHRS::get_position to get_location 2022-01-25 10:47:22 +11:00
Andrew Tridgell 3f2a72f9db AP_Compass: only magcal detected compasses
inflight compass learning with COMPASS_LEARN=3 was not working with
less than 3 compasses, as the force_use parameter was preventing
skipping compasses. This fixes it to calibate all detected compasses
that have USE enabled
2022-01-18 12:01:14 +11:00
Peter Barker ed608d37f6 AP_Compass: add and use AP_SIM_COMPASS_ENABLED 2022-01-17 15:24:02 +11:00