From 4cfaf1f39b9206c342bfb4ff55b95009c8c76a53 Mon Sep 17 00:00:00 2001 From: mateksys Date: Sat, 28 Dec 2024 12:31:19 +0800 Subject: [PATCH] AP_HAL_ChibiOS: add MatekG474-GPS hwdef --- .../hwdef/MatekG474-GPS/hwdef-bl.dat | 5 +++ .../hwdef/MatekG474-GPS/hwdef.dat | 40 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef-bl.dat create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef.dat diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef-bl.dat new file mode 100644 index 00000000000000..049bf166c925a0 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef-bl.dat @@ -0,0 +1,5 @@ +include ../MatekG474/hwdef-bl.inc + +# disable CAN1 +undef PA11 +undef PA12 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef.dat new file mode 100644 index 00000000000000..338daa32869d89 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekG474-GPS/hwdef.dat @@ -0,0 +1,40 @@ +include ../MatekG474/hwdef.inc + +# disable CAN1 +undef PA11 +undef PA12 + +# ----------- GPS +define HAL_PERIPH_ENABLE_GPS +define GPS_MAX_RATE_MS 200 + +define GPS_MAX_RECEIVERS 1 +define GPS_MAX_INSTANCES 1 + +define HAL_PERIPH_GPS_PORT_DEFAULT 2 + +# allow for F9P GPS modules with moving baseline +define GPS_MOVING_BASELINE 1 + + +# ----------- COMPASS +define HAL_PERIPH_ENABLE_MAG + +SPIDEV rm3100 SPI2 DEVID1 MAG_CS MODE0 1*MHZ 1*MHZ +COMPASS RM3100 SPI:rm3100 false ROTATION_PITCH_180 + +define HAL_COMPASS_MAX_SENSORS 1 + +define HAL_PROBE_EXTERNAL_I2C_COMPASSES + + +# ----------- MSP +define HAL_PERIPH_ENABLE_MSP +define HAL_MSP_ENABLED 1 +define AP_PERIPH_MSP_PORT_DEFAULT 3 + + +# larger CAN pool for RTCM data +undef HAL_CAN_POOL_SIZE +define HAL_CAN_POOL_SIZE 12000 +