Browse Source

AP_HAL_ChibiOS: add support for inline comments in hwdef.dat

c415-sdk
bugobliterator 4 years ago committed by Peter Barker
parent
commit
c02c546077
  1. 1
      libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

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

@ -2088,6 +2088,7 @@ def process_file(filename): @@ -2088,6 +2088,7 @@ def process_file(filename):
except Exception:
error("Unable to open file %s" % filename)
for line in f.readlines():
line = line.split('#')[0] # ensure we discard the comments
line = line.strip()
if len(line) == 0 or line[0] == '#':
continue

Loading…
Cancel
Save