Browse Source

HAL_ChibiOS: fix undef line processing

master
bugobliterator 7 years ago committed by Andrew Tridgell
parent
commit
c60c0b8ab1
  1. 6
      libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

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

@ -773,6 +773,12 @@ def process_line(line): @@ -773,6 +773,12 @@ def process_line(line):
spidev.append(a[1:])
if a[0] == 'undef':
config.pop(a[1], '')
#also remove all occurences of defines in previous lines if any
for line in alllines:
if line.startswith('define') and a[1] in line:
alllines.remove(line)

Loading…
Cancel
Save