mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_BoardConfig: allow PWM count setting on all chibios boards
This commit is contained in:
parent
ca33ff04d9
commit
db6c6b1677
@ -93,7 +93,7 @@ AP_BoardConfig *AP_BoardConfig::instance;
|
||||
|
||||
// table of user settable parameters
|
||||
const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
|
||||
#if AP_FEATURE_BOARD_DETECT
|
||||
#if AP_FEATURE_BOARD_DETECT || defined(AP_FEATURE_BRD_PWM_COUNT_PARAM)
|
||||
// @Param: PWM_COUNT
|
||||
// @DisplayName: Auxiliary pin config
|
||||
// @Description: Control assigning of FMU pins to PWM output, timer capture and GPIO. All unassigned pins can be used for GPIO
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
|
||||
// get number of PWM outputs enabled on FMU
|
||||
static uint8_t get_pwm_count(void) {
|
||||
#if AP_FEATURE_BOARD_DETECT
|
||||
#if AP_FEATURE_BOARD_DETECT || defined(AP_FEATURE_BRD_PWM_COUNT_PARAM)
|
||||
return instance?instance->state.pwm_count.get():4;
|
||||
#else
|
||||
return 0;
|
||||
@ -144,7 +144,7 @@ private:
|
||||
|
||||
AP_Int16 vehicleSerialNumber;
|
||||
|
||||
#if AP_FEATURE_BOARD_DETECT
|
||||
#if AP_FEATURE_BOARD_DETECT || defined(AP_FEATURE_BRD_PWM_COUNT_PARAM)
|
||||
struct {
|
||||
AP_Int8 pwm_count;
|
||||
AP_Int8 safety_enable;
|
||||
@ -158,7 +158,9 @@ private:
|
||||
AP_Int8 board_type;
|
||||
AP_Int8 io_enable;
|
||||
} state;
|
||||
#endif
|
||||
|
||||
#if AP_FEATURE_BOARD_DETECT
|
||||
static enum px4_board_type px4_configured_board;
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
|
Loading…
Reference in New Issue
Block a user