Browse Source

hwdef: turn off various GPS backends on on AP_Periph

apm_2208
Peter Barker 3 years ago committed by Andrew Tridgell
parent
commit
e788941f70
  1. 8
      libraries/AP_HAL_ChibiOS/hwdef/f103-GPS/hwdef.dat
  2. 46
      libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

8
libraries/AP_HAL_ChibiOS/hwdef/f103-GPS/hwdef.dat

@ -10,8 +10,14 @@ define HAL_PROBE_EXTERNAL_I2C_COMPASSES @@ -10,8 +10,14 @@ define HAL_PROBE_EXTERNAL_I2C_COMPASSES
undef HAL_UART_MIN_TX_SIZE
define HAL_UART_MIN_TX_SIZE 256
# GPS+MAG
# GPS
define HAL_PERIPH_ENABLE_GPS
# restrict backends available on f103:
define AP_GPS_NOVA_ENABLED 0
define AP_GPS_SBF_ENABLED 0
define AP_GPS_GSOF_ENABLED 0
# MAG
define HAL_PERIPH_ENABLE_MAG
#define HAL_PERIPH_ENABLE_NCP5623_LED_WITHOUT_NOTIFY
define HAL_PERIPH_ENABLE_TOSHIBA_LED_WITHOUT_NOTIFY

46
libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

@ -2782,6 +2782,52 @@ def add_apperiph_defaults(f): @@ -2782,6 +2782,52 @@ def add_apperiph_defaults(f):
#define AP_ROBOTISSERVO_ENABLED 0
#endif
/*
* GPS Backends - we selectively turn backends on.
* Note also that f103-GPS explicitly disables some of these backends.
*/
#define AP_GPS_BACKEND_DEFAULT_ENABLED 0
#ifndef AP_GPS_ERB_ENABLED
#define AP_GPS_ERB_ENABLED 0
#endif
#ifndef AP_GPS_GSOF_ENABLED
#define AP_GPS_GSOF_ENABLED defined(HAL_PERIPH_ENABLE_GPS)
#endif
#ifndef AP_GPS_NMEA_ENABLED
#define AP_GPS_NMEA_ENABLED 0
#endif
#ifndef AP_GPS_SBF_ENABLED
#define AP_GPS_SBF_ENABLED defined(HAL_PERIPH_ENABLE_GPS)
#endif
#ifndef AP_GPS_SBP_ENABLED
#define AP_GPS_SBP_ENABLED 0
#endif
#ifndef AP_GPS_SBP2_ENABLED
#define AP_GPS_SBP2_ENABLED 0
#endif
#ifndef AP_GPS_SIRF_ENABLED
#define AP_GPS_SIRF_ENABLED 0
#endif
#ifndef AP_GPS_MAV_ENABLED
#define AP_GPS_MAV_ENABLED 0
#endif
#ifndef AP_GPS_NOVA_ENABLED
#define AP_GPS_NOVA_ENABLED defined(HAL_PERIPH_ENABLE_GPS)
#endif
#ifndef HAL_SIM_GPS_ENABLED
#define HAL_SIM_GPS_ENABLED (AP_SIM_ENABLED && defined(HAL_PERIPH_ENABLE_GPS))
#endif
''')

Loading…
Cancel
Save