mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
HAL_ChibiOS: auto-set HAL_LOGGING_ENABLED for AP_Periph builds
This commit is contained in:
parent
dbf5357592
commit
ebe858f762
@ -1794,6 +1794,7 @@ def write_hwdef_header(outfilename):
|
|||||||
write_MAG_config(f)
|
write_MAG_config(f)
|
||||||
write_BARO_config(f)
|
write_BARO_config(f)
|
||||||
write_board_validate_macro(f)
|
write_board_validate_macro(f)
|
||||||
|
add_apperiph_defaults(f)
|
||||||
|
|
||||||
write_peripheral_enable(f)
|
write_peripheral_enable(f)
|
||||||
|
|
||||||
@ -2150,6 +2151,18 @@ def process_file(filename):
|
|||||||
else:
|
else:
|
||||||
process_line(line)
|
process_line(line)
|
||||||
|
|
||||||
|
def add_apperiph_defaults(f):
|
||||||
|
'''add default defines for peripherals'''
|
||||||
|
if env_vars.get('AP_PERIPH',0) == 0:
|
||||||
|
# not AP_Periph
|
||||||
|
return
|
||||||
|
print("Setting up as AP_Periph")
|
||||||
|
f.write('''
|
||||||
|
#ifndef HAL_LOGGING_ENABLED
|
||||||
|
#define HAL_LOGGING_ENABLED 0
|
||||||
|
#endif
|
||||||
|
''')
|
||||||
|
|
||||||
|
|
||||||
# process input file
|
# process input file
|
||||||
process_file(args.hwdef)
|
process_file(args.hwdef)
|
||||||
|
Loading…
Reference in New Issue
Block a user