Skip to content

Commit

Permalink
AP_HAL_ChibiOS: use new AP_PERIPH_RELAY_ENABLED define
Browse files Browse the repository at this point in the history
  • Loading branch information
shiv-tyagi committed Feb 20, 2025
1 parent a5c511a commit c5ca835
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/MatekL431-DShot/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ define HAL_SUPPORT_RCOUT_SERIAL 1
define HAL_WITH_ESC_TELEM 1

# also enable relay output via hardpoint msgs
define HAL_PERIPH_ENABLE_RELAY
define AP_PERIPH_RELAY_ENABLED 1
define AP_RELAY_ENABLED 1
6 changes: 6 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/scripts/defaults_periph.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
#ifdef HAL_PERIPH_ENABLE_ADSB
#error "Change 'define HAL_PERIPH_ENABLE_ADSB' to 'define AP_PERIPH_ADSB_ENABLED 1'"
#endif
#ifdef HAL_PERIPH_ENABLE_RELAY
#error "Change 'define HAL_PERIPH_ENABLE_RELAY' to 'define AP_PERIPH_RELAY_ENABLED 1'"
#endif
#ifdef HAL_PERIPH_ENABLE_RCIN
#error "Change 'define HAL_PERIPH_ENABLE_RCIN' to 'define AP_PERIPH_RCIN_ENABLED 1'"
#endif
Expand All @@ -221,6 +224,9 @@
#ifndef AP_PERIPH_BATTERY_ENABLED
#define AP_PERIPH_BATTERY_ENABLED 0
#endif
#ifndef AP_PERIPH_RELAY_ENABLED
#define AP_PERIPH_RELAY_ENABLED 0
#endif
#ifndef AP_PERIPH_BATTERY_BALANCE_ENABLED
#define AP_PERIPH_BATTERY_BALANCE_ENABLED 0
#endif
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/sw-boom-f407/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ PE4 ID_PIN INPUT GPIO(4) # high on left, low on right
PB10 HEAT_PIN OUTPUT GPIO(5) LOW # heater control, low is heater off, high is heater on
PB12 AUX3 OUTPUT GPIO(6) # aux 3

define HAL_PERIPH_ENABLE_RELAY 1
define AP_PERIPH_RELAY_ENABLED 1
define AP_RELAY_ENABLED 1
define RELAY1_PIN_DEFAULT 3
define RELAY2_PIN_DEFAULT 5
Expand Down

0 comments on commit c5ca835

Please sign in to comment.