AP_BoardConfig: added get_pwm_count()

This commit is contained in:
Andrew Tridgell 2018-01-06 21:21:46 +11:00
parent 26d6947bf6
commit 60b1eab06d
1 changed files with 9 additions and 0 deletions

View File

@ -102,6 +102,15 @@ public:
return false;
#endif
}
// get number of PWM outputs enabled on FMU
static uint8_t get_pwm_count(void) {
#if AP_FEATURE_BOARD_DETECT
return instance?instance->state.pwm_count.get():4;
#else
return false;
#endif
}
private:
static AP_BoardConfig *instance;