diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteF4/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/KakuteF4/hwdef.dat index 2339959a20..80201a0571 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteF4/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteF4/hwdef.dat @@ -120,14 +120,15 @@ FLASH_RESERVE_START_KB 64 define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_180 -# there is no compass fitted by default +# no built-in compass, but probe the i2c bus for all possible +# external compass types define ALLOW_ARM_NO_COMPASS +define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 -define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843 -define HAL_COMPASS_HMC5843_I2C_BUS 0 -define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E -define HAL_COMPASS_HMC5843_ROTATION ROTATION_YAW_90 - +# baro is a bmp280 on i2c define HAL_BARO_DEFAULT HAL_BARO_BMP280_I2C define HAL_BARO_BMP280_BUS 0 define HAL_BARO_BMP280_I2C_ADDR 0x76 @@ -139,7 +140,7 @@ SPIDEV osd SPI3 DEVID4 MAX7456_CS MODE0 10*MHZ 10*MHZ # setup for OSD define OSD_ENABLED ENABLED -ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin +ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin # 8 PWM available by default define BOARD_PWM_COUNT_DEFAULT 8 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat index ba8f21fe9e..2f1950b043 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405-Wing/hwdef.dat @@ -158,20 +158,27 @@ define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" define HAL_DATAFLASH_FILE_BUFSIZE 8 define HAL_DATAFLASH_MAV_BUFSIZE 2 + +# define default battery setup define HAL_BATT_VOLT_PIN 10 define HAL_BATT_CURR_PIN 11 define HAL_BATT_VOLT_SCALE 11 define HAL_BATT_CURR_SCALE 31.7 -define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843 -define HAL_COMPASS_HMC5843_I2C_BUS 1 -define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E -define HAL_COMPASS_HMC5843_ROTATION ROTATION_NONE +#analog rssi pin (also could be used as analog airspeed input) +# PC5 - ADC12_CH15 +define BOARD_RSSI_ANA_PIN 15 +# no built-in compass, but probe the i2c bus for all possible +# external compass types define ALLOW_ARM_NO_COMPASS +define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 define OSD_ENABLED ENABLED -ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin +ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin define BOARD_PWM_COUNT_DEFAULT 9 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat index fcc4527e63..e5381b25d1 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekF405/hwdef.dat @@ -9,8 +9,6 @@ # MCU class and specific type MCU STM32F4xx STM32F405xx -define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_CHIBIOS_MATEKF405 - # board ID for firmware load APJ_BOARD_ID 125 @@ -75,11 +73,17 @@ PC4 BATT_CURRENT_SENS ADC1 SCALE(1) PB1 RSSI_ADC_PIN ADC1 SCALE(1) # define default battery setup -define HAL_BATT_VOLT_PIN 13 -define HAL_BATT_CURR_PIN 12 +# PC5 - ADC12_CH15 +define HAL_BATT_VOLT_PIN 15 +# PC4 - ADC12_CH14 +define HAL_BATT_CURR_PIN 14 define HAL_BATT_VOLT_SCALE 10.1 define HAL_BATT_CURR_SCALE 17.0 +#analog rssi pin (also could be used as analog airspeed input) +# PB1 - ADC12_CH9 +define BOARD_RSSI_ANA_PIN 9 + # USART1 PA9 USART1_TX USART1 PA10 USART1_RX USART1 @@ -132,13 +136,13 @@ FLASH_RESERVE_START_KB 64 define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_180 -# there is no compass fitted by default +# no built-in compass, but probe the i2c bus for all possible +# external compass types define ALLOW_ARM_NO_COMPASS - -define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843 -define HAL_COMPASS_HMC5843_I2C_BUS 0 -define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E -define HAL_COMPASS_HMC5843_ROTATION ROTATION_YAW_90 +define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 define HAL_BARO_DEFAULT HAL_BARO_BMP280_I2C define HAL_BARO_BMP280_BUS 0 @@ -168,4 +172,4 @@ define BOARD_PWM_COUNT_DEFAULT 8 # setup for OSD define OSD_ENABLED ENABLED -ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin +ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin diff --git a/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat index 872d45e848..a8912a5f3d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/OMNIBUSF7V2/hwdef.dat @@ -90,8 +90,8 @@ PC5 RSSI_ADC ADC1 PA10 USART1_RX USART1 PA9 USART1_TX USART1 -# USART2 for SBUS input, RX only -#PA3 USART2_RX USART2 +# USART2 for RC input, RX only +PA3 TIM9_CH2 TIM2 RCININT FLOAT LOW # USART3 PD9 USART3_RX USART3 @@ -120,8 +120,18 @@ SPIDEV sdcard SPI4 DEVID1 SDCARD_CS MODE0 400*KHZ 25*MHZ SPIDEV osd SPI2 DEVID1 MAX7456_CS MODE0 10*MHZ 10*MHZ define HAL_OS_FATFS_IO 1 +define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" +define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" + +# no built-in compass, but probe the i2c bus for all possible +# external compass types define ALLOW_ARM_NO_COMPASS +define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 + define HAL_BARO_DEFAULT HAL_BARO_BMP280_SPI define OSD_ENABLED ENABLED -ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin +ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin diff --git a/libraries/AP_HAL_ChibiOS/hwdef/airbotf4/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/airbotf4/hwdef.dat index 3c7053312e..5d5a3bece5 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/airbotf4/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/airbotf4/hwdef.dat @@ -86,9 +86,11 @@ define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C define HAL_BARO_MS5611_I2C_BUS 0 define HAL_BARO_MS5611_I2C_ADDR 0x77 -define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843 -define HAL_COMPASS_HMC5843_I2C_BUS 0 -define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E +define ALLOW_ARM_NO_COMPASS +define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 define STORAGE_FLASH_PAGE 1 define HAL_STORAGE_SIZE 15360 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat index e62c3401eb..c3ea40df0e 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/crazyflie2/hwdef.dat @@ -113,10 +113,12 @@ define HAL_BARO_LPS25H_I2C_BUS 0 define HAL_BARO_LPS25H_I2C_ADDR 0x5D define HAL_BARO_LPS25H_I2C_IMU_ADDR HAL_INS_MPU60x0_I2C_ADDR -define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_I2C -define HAL_COMPASS_AK8963_I2C_BUS 0 -define HAL_COMPASS_AK8963_I2C_ADDR 0x0c - +# no built-in compass, but probe the i2c bus for all possible +# external compass types define ALLOW_ARM_NO_COMPASS +define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 define MAG_BOARD_ORIENTATION ROTATION_YAW_180 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/cube-red/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/cube-red/hwdef.dat index 4281f9146c..f61dc047f8 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/cube-red/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/cube-red/hwdef.dat @@ -2,7 +2,7 @@ # for ProfiCNC/Hex CUBE RED hardware # MCU class and specific type -MCU STM32F7xx STM32F769xx +MCU STM32F7xx STM32F767xx # board ID for firmware load APJ_BOARD_ID 9 @@ -48,7 +48,7 @@ PA7 SPI1_MOSI SPI1 PA8 CAN3_RX CAN3 PA9 VBUS INPUT OPENDRAIN -PA10 IO-debug-console +#PA10 IO-debug-console PA11 OTG_FS_DM OTG1 PA12 OTG_FS_DP OTG1 PA13 JTMS-SWDIO SWD @@ -85,19 +85,19 @@ PC1 HW_REV_SENSE INPUT PC6 USART6_TX USART6 PC7 USART6_RX USART6 -PC8 SDIO_D0 SDIO -PC9 SDIO_D1 SDIO -PC10 SDIO_D2 SDIO -PC11 SDIO_D3 SDIO -PC12 SDIO_CK SDIO +PC8 SDMMC_D0 SDMMC1 +PC9 SDMMC_D1 SDMMC1 +PC10 SDMMC_D2 SDMMC1 +PC11 SDMMC_D3 SDMMC1 +PC12 SDMMC_CK SDMMC1 +PD2 SDMMC_CMD SDMMC1 + PC13 GYRO_EXT_CS CS -PC14 32KHz_IN -PC15 32KHz_OUT PD0 CAN1_RX CAN1 PD1 CAN1_TX CAN1 -PD2 SDIO_CMD SDIO + # USART2 serial2 telem1 PD3 USART2_CTS USART2 PD4 USART2_RTS USART2 @@ -139,18 +139,18 @@ PE15 VDD_5V_PERIPH_OC INPUT #PF0 #PF1 PF2 ICM20649_CS CS -PF3 FMU_AUX_POWER ADC1 SCALE(1) -PF4 FMU_AUX_ADC2 ADC1 SCALE(1) -PF5 PRESSURE_SENS ADC1 SCALE(1) +#PF3 FMU_AUX_POWER ADC1 SCALE(1) +#PF4 FMU_AUX_ADC2 ADC1 SCALE(1) +#PF5 PRESSURE_SENS ADC1 SCALE(1) #PF6 #PF7 #PF8 #PF9 -PF10 SPI4_MS5611_CS CS -PF11 SPI4_SPARE_CS CS +PF10 MS5611_CS CS +PF11 SPARE_CS CS #PF12 -PF13 VDD_5V_HIPOWER_OC +PF13 VDD_5V_HIPOWER_OC INPUT #PF14 #PF15 @@ -163,10 +163,10 @@ PG4 VDD_5V_PERIPH_EN OUTPUT LOW #PG6 #PG7 -PG8 SPI6_CS CS +#PG8 SPI6_CS CS #PG9 #PG10 -PG11 SPI6_CS2 CS +#PG11 SPI6_CS2 CS PG12 SPI6_MISO SPI6 PG13 SPI6_SCK SPI6 #PG14 @@ -182,7 +182,7 @@ PH3 HW_REV_DRIVE OUTPUT HIGH #PH7 #PH8 -PH9 ALARM +PH9 ALARM OUTPUT #PH10 #PH11 #PH12 @@ -195,7 +195,7 @@ PH9 ALARM #PI2 #PI3 #PI4 -PI5 PPM_IN +#PI5 PPM_IN #PI6 #PI7 @@ -210,20 +210,20 @@ PI5 PPM_IN # when moving to ChibiOS #sensors on Main FMU board -SPIDEV ms5611 SPI1 DEVID3 SPI1_MS5611_CS MODE3 20*MHZ 20*MHZ -SPIDEV ICM20649 SPI1 DEVID ICM20649_CS MODE3 1*MHZ 8*MHZ +SPIDEV ms5611 SPI1 DEVID3 MS5611_CS MODE3 20*MHZ 20*MHZ +SPIDEV ICM20649 SPI1 DEVID2 ICM20649_CS MODE3 1*MHZ 8*MHZ #Sensors on the isolated IMU Board -SPIDEV ICM20602 SPI4 DEVID ICM20602_CS MODE3 1*MHZ 8*MHZ -SPIDEV ms5611_ext SPI4 DEVID2 SPI4_MS5611_CS MODE3 20*MHZ 20*MHZ -SPIDEV ICM20948 SPI4 DEVID ICM20948_CS MODE3 1*MHZ 8*MHZ +#SPIDEV ICM20602 SPI4 DEVID1 ICM20602_CS MODE3 1*MHZ 8*MHZ +SPIDEV ms5611_ext SPI4 DEVID2 MS5611_CS MODE3 20*MHZ 20*MHZ +SPIDEV ICM20948 SPI4 DEVID3 ICM20948_CS MODE3 1*MHZ 8*MHZ #FRAM SPIDEV ramtron SPI2 DEVID10 FRAM_CS MODE3 8*MHZ 8*MHZ #Spare CS Pins for external SPI devices (SPI6) -SPIDEV EXTERNAL_DEV1 SPI6 DEVID SPI6_CS MODE0 2*MHZ 2*MHZ -SPIDEV EXTERNAL_DEV2 SPI6 DEVID SPI6_CS2 MODE1 2*MHZ 2*MHZ +#SPIDEV EXTERNAL_DEV1 SPI6 DEVID1 SPI6_CS MODE0 2*MHZ 2*MHZ +#SPIDEV EXTERNAL_DEV2 SPI6 DEVID2 SPI6_CS2 MODE1 2*MHZ 2*MHZ define HAL_CHIBIOS_ARCH_CUBE_RED 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/fmuv4-beta/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/fmuv4-beta/hwdef.dat index 8021e52e05..d371cbae76 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/fmuv4-beta/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/fmuv4-beta/hwdef.dat @@ -5,6 +5,7 @@ include ../fmuv4/hwdef.dat # SPI2 SCK is on PB13 #define GPIO_SPI2_SCK (GPIO_SPI2_SCK_2|GPIO_SPEED_50MHz) undef SPI2_SCK +undef PB13 PB13 SPI2_SCK SPI2 # note that PC13 (SBUS invert) is active low on this board diff --git a/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat index ab2819052b..d4b0c6bdb3 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/fmuv5/hwdef.dat @@ -94,8 +94,13 @@ I2C_ORDER I2C3 I2C1 I2C2 I2C4 # enable pins PE3 VDD_3V3_SENSORS_EN OUTPUT HIGH -PF12 nVDD_5V_HIPOWER_EN OUTPUT LOW -PG4 nVDD_5V_PERIPH_EN OUTPUT LOW + +# start peripheral power off, then enable after init +# this prevents a problem with radios that use RTS for +# bootloader hold +PF12 nVDD_5V_HIPOWER_EN OUTPUT HIGH +PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH + PG5 VDD_5V_RC_EN OUTPUT HIGH PG6 VDD_5V_WIFI_EN OUTPUT HIGH PG7 VDD_3V3_SD_CARD_EN OUTPUT HIGH @@ -240,11 +245,10 @@ PD2 SDMMC_CMD SDMMC1 define HAL_STORAGE_SIZE 16384 define HAL_WITH_RAMTRON 1 -# define STORAGE_FLASH_PAGE 11 - define HAL_BARO_DEFAULT HAL_BARO_MS5611_SPI define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 DMA_PRIORITY SDMMC* UART8* ADC* SPI* TIM* diff --git a/libraries/AP_HAL_ChibiOS/hwdef/mindpx-v2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/mindpx-v2/hwdef.dat index 2c0cd8da93..7356825cb3 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/mindpx-v2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/mindpx-v2/hwdef.dat @@ -195,3 +195,5 @@ define HAL_BATT_CURR_SCALE 17.0 # 12 PWM available by default define BOARD_PWM_COUNT_DEFAULT 12 + +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/mini-pix/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/mini-pix/hwdef.dat index 9fa4aff9e5..832a3ba23e 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/mini-pix/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/mini-pix/hwdef.dat @@ -115,7 +115,14 @@ define HAL_BARO_DEFAULT HAL_BARO_LPS22H_SPI define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI define HAL_INS_DEFAULT_ROTATION ROTATION_PITCH_180 -define HAL_COMPASS_DEFAULT HAL_COMPASS_QMC5883L + +# the mini-pix has a QMC5883L both internal and external, detected +# using HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_COMPASS_QMC5883L_ORIENTATION_INTERNAL ROTATION_PITCH_180_YAW_270 + +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" diff --git a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef-bl.dat index 74bbcd33c5..fcfff98be0 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef-bl.dat @@ -21,7 +21,6 @@ FLASH_RESERVE_START_KB 0 # LEDs PB5 LED_BOOTLOADER OUTPUT LOW -PB4 LED_ACTIVITY OUTPUT LOW define HAL_LED_ON 0 # the location where the bootloader will put the firmware diff --git a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat index dae30993fd..2848936c8e 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/omnibusf4pro/hwdef.dat @@ -100,9 +100,13 @@ define HAL_INS_DEFAULT_ROTATION ROTATION_YAW_180 define HAL_BARO_DEFAULT HAL_BARO_BMP280_SPI define HAL_BARO_BMP280_NAME "bmp280" -define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843 -define HAL_COMPASS_HMC5843_I2C_BUS 0 -define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E +# no built-in compass, but probe the i2c bus for all possible +# external compass types +define ALLOW_ARM_NO_COMPASS +define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 define STORAGE_FLASH_PAGE 1 define HAL_STORAGE_SIZE 15360 @@ -119,6 +123,11 @@ define HAL_BATT_CURR_PIN 11 define HAL_BATT_VOLT_SCALE 11 define HAL_BATT_CURR_SCALE 18.2 +#analog rssi pin (also could be used as analog airspeed input) +# PA0 - ADC123_CH0 +define BOARD_RSSI_ANA_PIN 0 + + define HAL_GPIO_A_LED_PIN 57 define OSD_ENABLED ENABLED @@ -134,4 +143,4 @@ define BOARD_PWM_COUNT_DEFAULT 6 #define CH_DBG_ENABLE_STACK_CHECK TRUE #font for the osd -ROMFS osd_font.bin libraries/AP_OSD/fonts/clarity.bin +ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin diff --git a/libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat index f876200d22..108341ecfe 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef.dat @@ -123,6 +123,7 @@ define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843 define HAL_COMPASS_HMC5843_I2C_BUS 0 define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E define HAL_COMPASS_HMC5843_ROTATION ROTATION_YAW_270 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 define HAL_BARO_DEFAULT HAL_BARO_MS5611_I2C define HAL_BARO_MS5611_I2C_BUS 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat index af062ca64f..306e14c2a7 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat @@ -127,7 +127,9 @@ FLASH_RESERVE_START_KB 64 define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI define HAL_COMPASS_DEFAULT HAL_COMPASS_AK8963_MPU9250 - +define HAL_PROBE_EXTERNAL_I2C_COMPASSES +define HAL_I2C_INTERNAL_MASK 0 +define HAL_COMPASS_AUTO_ROT_DEFAULT 2 # SPI devices SPIDEV mpu9250 SPI1 DEVID4 MPU_CS MODE3 1*MHZ 4*MHZ