AP_HAL_ChibiOS: move AP_Periph config of NUM_SERVO_CHANNELS into chibios_hwdef.py

This commit is contained in:
Peter Barker 2022-12-01 11:36:20 +11:00 committed by Peter Barker
parent 8a312d4f34
commit d4930b4e55
1 changed files with 10 additions and 0 deletions

View File

@ -2876,6 +2876,16 @@ def add_apperiph_defaults(f):
#define AP_ROBOTISSERVO_ENABLED 0
#endif
// by default an AP_Periph defines as many servo output channels as
// there are PWM outputs:
#ifndef NUM_SERVO_CHANNELS
#ifdef HAL_PWM_COUNT
#define NUM_SERVO_CHANNELS HAL_PWM_COUNT
#else
#define NUM_SERVO_CHANNELS 0
#endif
#endif
#ifndef AP_STATS_ENABLED
#define AP_STATS_ENABLED 0
#endif