Skip to content

Commit

Permalink
AP_HAL_ChibiOS: allow AP_SCRIPTING_ENABLED to come from hwdef files
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jun 9, 2023
1 parent caf35b7 commit 3aaeb0f
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 7 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/BeastH7/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,7 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
define STM32_PWM_USE_ADVANCED TRUE

define DEFAULT_NTF_LED_TYPES 257


// disable scripting - no SD card
define AP_SCRIPTING_ENABLED 0
3 changes: 1 addition & 2 deletions libraries/AP_HAL_ChibiOS/hwdef/CubeBlack-periph/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ define HAL_PERIPH_ENABLE_BATTERY

define CAN_APP_NODE_NAME "org.ardupilot.CubeBlack-periph"


env DISABLE_SCRIPTING 1
define AP_SCRIPTING_ENABLED 0

# use blue LED
define HAL_GPIO_PIN_LED HAL_GPIO_PIN_FMU_LED_AMBER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ define HAL_BARO_ALLOW_INIT_NO_BARO
define CAN_APP_NODE_NAME "org.ardupilot.CubeOrange-periph"


env DISABLE_SCRIPTING 1
define AP_SCRIPTING_ENABLED 0

# use blue LED
define HAL_GPIO_PIN_LED HAL_GPIO_PIN_FMU_LED_AMBER
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/CubeOrange-periph/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ define HAL_BARO_ALLOW_INIT_NO_BARO
define CAN_APP_NODE_NAME "org.ardupilot.CubeOrange-periph"


env DISABLE_SCRIPTING 1
define AP_SCRIPTING_ENABLED 0

# use blue LED
define HAL_GPIO_PIN_LED HAL_GPIO_PIN_FMU_LED_AMBER
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/CubeRedSecondary/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ define DEFAULT_SERIAL2_PROTOCOL SerialProtocol_RCIN
define DEFAULT_SERIAL3_PROTOCOL SerialProtocol_Sbus1
define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_RCIN

define AP_SCRIPTING_ENABLED 0

# only use pulse input for PPM, other protocols
# are on serial
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/FoxeerH743v1/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,5 @@ define HAL_COMPASS_AUTO_ROT_DEFAULT 2
define HAL_DEFAULT_INS_FAST_SAMPLE 1
# Motor order implies Betaflight/X for standard ESCs
define HAL_FRAME_TYPE_DEFAULT 12

define AP_SCRIPTING_ENABLED 0
1 change: 1 addition & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/HerePro/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ define HAL_DEFAULT_CPORT 1
define CONFIGURE_PPS_PIN TRUE
define AP_PERIPH_HAVE_LED TRUE

define AP_SCRIPTING_ENABLED 1
define SCRIPTING_HEAP_SIZE (64*1024)

define GPS_MOVING_BASELINE 1
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,5 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
define STM32_PWM_USE_ADVANCED TRUE

define DEFAULT_NTF_LED_TYPES 257

define AP_SCRIPTING_ENABLED 0
2 changes: 2 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ define HAL_LOGGING_DATAFLASH_ENABLED 1
define HAL_LOGGING_DATAFLASH_DRIVER AP_Logger_W25N01GV

define DEFAULT_NTF_LED_TYPES 257

define AP_SCRIPTING_ENABLED 0
2 changes: 2 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/MambaH743v4/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,5 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
define STM32_PWM_USE_ADVANCED TRUE

define DEFAULT_NTF_LED_TYPES 257

define AP_SCRIPTING_ENABLED 0
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/MatekH743-periph/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define HAL_USE_RTC FALSE
define HAL_NO_RCIN_THREAD


env DISABLE_SCRIPTING 1
define AP_SCRIPTING_ENABLED 0

MAIN_STACK 0x2000
PROCESS_STACK 0x6000
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/Pixracer-periph/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ define HAL_DISABLE_ADC_DRIVER FALSE
define CAN_APP_NODE_NAME "org.ardupilot.Pixracer_periph"


env DISABLE_SCRIPTING 1
define AP_SCRIPTING_ENABLED 0

MAIN_STACK 0x2000
PROCESS_STACK 0x6000
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/SkystarsH7HD/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,5 @@ ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
define STM32_PWM_USE_ADVANCED TRUE

define DEFAULT_NTF_LED_TYPES 257

define AP_SCRIPTING_ENABLED 0
5 changes: 4 additions & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,6 @@ def write_mcu_config(self, f):
else:
f.write('#define HAL_USE_SDC FALSE\n')
self.build_flags.append('USE_FATFS=no')
self.env_vars['DISABLE_SCRIPTING'] = True
if 'OTG1' in self.bytype:
if self.get_mcu_config('STM32_OTG2_IS_OTG1', False) is not None:
f.write('#define STM32_USB_USE_OTG2 TRUE\n')
Expand Down Expand Up @@ -3262,6 +3261,10 @@ def add_apperiph_defaults(self, f):
#define HAL_PROXIMITY_ENABLED 0
#endif
#ifndef AP_SCRIPTING_ENABLED
#define AP_SCRIPTING_ENABLED 0
#endif
// end AP_Periph defaults
''')

Expand Down
3 changes: 3 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,7 @@ define AP_LTM_TELEM_ENABLED 0
// no buttons on SkyViper:
define HAL_BUTTON_ENABLED 0

// disable scripting on SkyViper (should we enable this?)
define AP_SCRIPTING_ENABLED 0

AUTOBUILD_TARGETS Copter

0 comments on commit 3aaeb0f

Please sign in to comment.