Peter Barker
57688f5e03
AP_Compass: use get_roll_deg in place of degrees(get_roll_rad) etc.
2025-08-05 09:00:08 +09:00
Peter Barker
3708936c62
global: correct shebang lines to refernce python3
...
also remove the odd encoding line which is not required in Py3
2025-07-22 10:45:57 +10:00
Peter Barker
8189f7693e
AP_Compass: remove remaining vrbrain FMU architectures and PX4_BOARD_TYPEs
2025-06-25 18:17:19 +10:00
Peter Barker
17bd219c7f
AP_Compass: remove support for SP01 board
...
there's no automatic setting for this board, so it would have been selected by parameter only.
This was a development board pre-PCNC01 - it wasn't widely distributed.
If we want this back we can create a full-on board for it...
2025-06-24 10:38:58 +10:00
Peter Barker
162e2e0ff4
AP_Compass: remove PCNC1 board type
...
only used for one board, so inline everything required
2025-06-17 10:59:00 +10:00
Peter Barker
88d0bdb1bf
AP_Compass: move VRBrain-v54 sensors to hwdef
2025-06-11 17:22:55 +10:00
Peter Barker
9fe7f960b1
AP_Compass: remove dead sensor detect code
...
these boards specify their internal devices so don't cross these paths
2025-06-10 16:28:17 +10:00
muramura
012e727dfc
AP_Compass: Specify the names of the supported devices
2025-06-07 10:46:51 +10:00
Peter Barker
521de42cf7
AP_Compass: rename AHRS get_roll etc accessors to include _rad
2025-06-05 17:28:41 +10:00
Peter Barker
ea11c1053d
AP_Compass: remove line feeds from GCS_SEND_TEXT calls
...
these often make their way in when moving from some other printf-style debugging...
2025-05-30 22:36:07 +10:00
Peter Barker
224dbc4ac7
AP_Compass: replace ToRad with radians and ToDeg with degrees
2025-05-29 11:24:56 +10:00
Peter Barker
652b7369f0
AP_Compass: have AK09916-via-ICM20948 depend on AP_INERTIALSENSOR_ENABLED
2025-05-13 18:48:05 +01:00
Peter Barker
3b09612552
AP_Compass: remove unnueccesary HAL_BUILD_AP_PERIPH check
2025-05-13 18:48:05 +01:00
Peter Barker
a294713975
AP_Compass: rename HAL_EXTERNAL_AHRS_ENABLED to AP_EXTERNAL_AHRS_ENABLED
...
in preparation for making this an optional feature; a lot of people will want to go and put this in their hwdef files as soon as we do this!
2025-05-13 09:06:44 +09:00
muramura
1e791e9dcd
AP_Compass: Remove the external reference to HAL
2025-05-06 08:39:32 +10:00
Peter Barker
a0a1444b68
AP_Compass: mark backend detection methods as initfunc
...
.... allows CubeRedPrimary to be compiled again
2025-04-29 08:29:41 +09:00
Andy Piper
33c71b1bc1
AP_Compass: recover flash on CubeRedPrimary with EKF2
2025-04-09 13:30:27 +01:00
Peter Barker
6338d10b5f
global: create and use HAL_PROGRAM_SIZE_LIMIT_KB
...
We will reserve BOARD_FLASH_SIZE for the internal flash on stm32 flash processors, use HAL_PROGRAM_SIZE_LIMIT_KB in the general code base.
Notable change here is that boards with external flash will start to get features only available with more than 2MB of program storage
2025-02-26 10:06:39 +11:00
Peter Barker
a6d88fd25e
AP_Compass: mark many functions as __INITFUNC__
...
... implying they can go into external flash
2025-02-19 18:01:48 +11:00
Peter Barker
c7a9054d14
AP_Compass: move custom compass rotation into linux hwdefs
2025-02-19 15:42:52 +11:00
Peter Barker
6298f7dc58
AP_Compass: make compass LearnType enum-class and parameter AP_Enum
2025-01-29 19:21:59 +11:00
Peter Barker
9e4a180878
AP_Compass: remove vestiges of LearnType::LEARN_INTERNAL
...
57a3bc1397 changed the code from "internal" to "in-flight
It seems the old value of "1" was no longer valid
It also changed things to that the learning system saved the offsets.
2025-01-28 12:23:53 +11:00
Jacob Dahl
64bb0ad762
AP_Compass: add IIS2MDC driver
2025-01-15 19:10:16 +11:00
Thomas Watson
d86bab9c58
AP_Compass: optimize DroneCAN subscription process
...
* remove unnecessary nullptr check, these are always called from an
initialized AP_DroneCAN so if it's nullptr something has gone
horrifically wrong
* pass in driver index instead of repeatedly calling function to get it
* simplify error handling; knowing exactly which allocation failed is not
super helpful and one failing likely means subsequent ones will too,
as it can only fail due to being out of memory
2024-11-18 10:30:29 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
6a59d3adae
AP_Compass: Also mark Z axis as calibrations, just like the XY
2024-11-05 09:25:59 +09:00
Peter Barker
a29dca996e
AP_Compass: re-order initialiser lines so -Werror=reorder will work
2024-09-24 22:50:28 +10:00
Peter Barker and muramura
3e1ad5dab6
AP_Compass: use memcmp to check whoami result code from HMC5843 device
...
Co-authored-by: muramura <ma2maru@gmail.com >
2024-09-24 11:52:47 +10:00
muramura
0020cf5fe8
AP_Compass: Add existing devices
2024-09-22 10:11:50 +10:00
cuav-chen2
89a4571c58
AP_Compass: Add in BMM350 Driver
2024-09-21 10:08:36 +10:00
Peter Barker
42b8ee78cf
AP_Compass: remove use of AP_AHRS from most headers
...
don't need to know the details, just that it is a class
2024-09-03 10:35:54 +10:00
Peter Barker
60c2e4278c
AP_Compass: avoid use of MAV_RESULT if mavlink bindings not used
2024-08-14 19:40:31 +10:00
Peter Barker
27a7a21805
AP_Compass: correct compilation when logging disabled
2024-08-12 18:28:07 +10:00
Peter Barker and muramura
fa4e90a3bb
AP_Compass: use GCS_SEND_TEXT rather than gcs().send_text
...
Co-authored-by: muramura <ma2maru@gmail.com >
2024-08-07 18:33:16 +10:00
Andrew Tridgell
991ea6326d
AP_Compass: cleanup warnings in printf calls
2024-07-11 09:34:29 +10:00
Peter Barker
4231275f50
AP_Compass: remove default clause from set_status switch
...
forces someone to consider what they need to do for any new state
2024-07-10 18:18:31 +10:00
Peter Barker
afd8d8255f
AP_Compass: use switch statement in failed() method
2024-07-10 18:18:31 +10:00
Willian Galvani
64e859ecc5
AP_Compass: warn user if fix_radius() is skipped
2024-07-09 10:13:34 +10:00
Willian Galvani
325d6f6c94
AP_Compass: use ahrs for location instead of GPS directly for calibration
2024-07-09 10:13:34 +10:00
Simon Hancock
43c604f1db
AP_Compass: Fix fewer multipliers than params on MAGH log message
2024-06-19 09:38:59 +10:00
Andrew Tridgell
0f08b47322
AP_Compass: use NEW_NOTHROW for new(std::nothrow)
2024-06-04 09:20:21 +10:00
Andrew Tridgell
5fd4e23fa9
AP_Compass: removed IST8310 overrun message
...
this is not useful and just causes concern to users. Any small bus
delay can trigger this. We have health monitoring at a higher level
2024-05-22 14:51:15 +10:00
Andrew Tridgell
68b58d5435
AP_Compass: workaround hardware bug in IST8310 whoami
...
the WAI (whoami) register is writeable. Not only is it writeable, but
the written value is persistent across a power cycle. You have to
remove power for about 30s for it to finally go back to the right
default value of 0x10
this makes using WAI as a test for finding a IST8310 problematic. The
best we can do is send a soft reset which will reset it to default for
us to then check
2024-05-01 09:24:54 +10:00
Andrew Tridgell
76343f5e6f
AP_Compass: log Hires magnetic field on DroneCAN
2024-03-16 20:10:35 +11:00
Patrick José Pereira
84a5a52351
AP_Compass: Use new default for reboot
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com >
2024-03-12 21:13:41 +11:00
Peter Barker
093deed610
AP_Compass: add and use AP_CUSTOMROTATIONS_ENABLED
...
also add to build_options.py
2024-03-03 08:22:46 +11:00
Peter Barker
c36b57acba
AP_Compass: exclude cpp files if not AP_COMPASS_ENABLED
2024-02-27 11:02:48 +11:00
Peter Barker
dc74f97739
AP_Compass: move logger object up to AP_Vehicle
2024-02-13 10:54:29 +11:00
Peter Barker
0e67209790
AP_Compass: fixed-yaw requires the AP_AHRS library to exist
2024-02-10 11:47:10 +11:00
Peter Barker
084b0aea24
AP_Compass: make compass.mag_cal_fixed_yaw return boolean
...
this method could be used from a transmitter without GCS enabled, for example
2024-02-06 11:11:27 +11:00
Peter Barker
ecc7188d97
AP_Compass: rename COMPASS_TYPEMASK to COMPASS_DISBLMSK
...
this is a very confusingly named parameter. I've seen several instances of people treating this as an enable mask rather than a disable mask
2024-01-23 11:54:49 +11:00