From c05086430d9710aec586e3a5cdb4ff39853f87da Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 6 Jun 2018 12:37:24 +1000 Subject: [PATCH] HAL_ChibiOS: fixed hwdef.h generation for PWM on tim12 --- libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index d228ce453e..ae97a4ec97 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -755,7 +755,7 @@ def write_PWM_config(f): f.write('// PWM timer config\n') for t in sorted(pwm_timers): - n = int(t[3]) + n = int(t[3:]) f.write('#define STM32_PWM_USE_TIM%u TRUE\n' % n) f.write('#define STM32_TIM%u_SUPPRESS_ISR\n' % n) f.write('\n') @@ -763,7 +763,7 @@ def write_PWM_config(f): groups = [] for t in sorted(pwm_timers): group = len(groups) + 1 - n = int(t[3]) + n = int(t[3:]) chan_list = [255, 255, 255, 255] chan_mode = [ 'PWM_OUTPUT_DISABLED', 'PWM_OUTPUT_DISABLED',