From 75cff5a1b87bb58dd6db012ca6b25fc1e7fcf556 Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 12 Jun 2024 12:51:25 +0100 Subject: [PATCH] AP_HAL_ChibiOS: update relay parameter names --- .../AP_HAL_ChibiOS/hwdef/KakuteH7Mini/defaults.parm | 2 +- libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/README.md | 2 +- .../AP_HAL_ChibiOS/hwdef/KakuteH7v2/defaults.parm | 2 +- .../hwdef/MambaF405-2022/defaults.parm | 2 +- .../AP_HAL_ChibiOS/hwdef/MambaH743v4/defaults.parm | 2 +- .../AP_HAL_ChibiOS/hwdef/MatekF765-Wing/hwdef.dat | 8 ++++---- .../hwdef/QioTekAdeptF407/defaults.parm | 12 ++++++------ .../hwdef/QioTekZealotH743-bdshot/defaults.parm | 4 ++-- .../hwdef/QioTekZealotH743/defaults.parm | 4 ++-- .../AP_HAL_ChibiOS/hwdef/RADIX2HD/defaults.parm | 2 +- libraries/AP_HAL_ChibiOS/hwdef/SDMODELH7V2/README.md | 2 +- .../hwdef/SkystarsH7HD-bdshot/defaults.parm | 3 ++- .../AP_HAL_ChibiOS/hwdef/luminousbee5/defaults.parm | 2 -- .../hwdef/skyviper-journey/defaults.parm | 7 ++++--- .../hwdef/skyviper-v2450/defaults.parm | 7 ++++--- 15 files changed, 31 insertions(+), 30 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini/defaults.parm index 3687d251b5..74526c42af 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7Mini/defaults.parm @@ -1,7 +1,7 @@ # setup for LEDs on chan9 SERVO9_FUNCTION 120 # Default VTX power to on -RELAY_DEFAULT 1 +RELAY2_DEFAULT 1 # UART1 for DJI Goggles SERIAL1_PROTOCOL 33 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/README.md b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/README.md index 45610569ce..9589e7e46a 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/README.md +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/README.md @@ -52,7 +52,7 @@ The KakuteH7 v2 supports OSD using OSD_TYPE 1 (MAX7456 driver). ## VTX Support The JST-GH-6P connector supports a standard DJI HD VTX connection. Pin 1 of the connector is 9v so be careful not to connect -this to a peripheral requiring 5v. The 9v supply is controlled by RELAY_PIN2 and is on by default. It can be configured to be operated by an RC switch by selecting the function RELAY2. +this to a peripheral requiring 5v. The 9v supply is controlled by RELAY2_PIN and is on by default. It can be configured to be operated by an RC switch by selecting the function RELAY2. ## PWM Output diff --git a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/defaults.parm index 8775f3bf22..7258a35328 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7v2/defaults.parm @@ -1,7 +1,7 @@ # setup for LEDs on chan9 SERVO9_FUNCTION 120 # Default VTX power to on -RELAY_DEFAULT 1 +RELAY2_DEFAULT 1 # UART1 for DJI Goggles SERIAL1_PROTOCOL 33 # UART3 for VTX diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MambaF405-2022/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/MambaF405-2022/defaults.parm index 2244d788d4..ed3aebd906 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MambaF405-2022/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/MambaF405-2022/defaults.parm @@ -1,7 +1,7 @@ # setup for LEDs on chan9 SERVO7_FUNCTION 120 # Default VTX power to on -RELAY_DEFAULT 1 +RELAY2_DEFAULT 1 # UART1 is RX input SERIAL1_PROTOCOL 23 # UART2 is GPS diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MambaH743v4/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/MambaH743v4/defaults.parm index 48efb2e98b..43c6d08d36 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MambaH743v4/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/MambaH743v4/defaults.parm @@ -1,5 +1,5 @@ # setup for LEDs on chan9 SERVO9_FUNCTION 120 # Default VTX power to on -RELAY_DEFAULT 1 +RELAY2_DEFAULT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/MatekF765-Wing/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/MatekF765-Wing/hwdef.dat index b82adcc888..2da3814638 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/MatekF765-Wing/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/MatekF765-Wing/hwdef.dat @@ -132,10 +132,10 @@ PE10 UART7_CTS UART7 PE9 UART7_RTS UART7 # telem1-UART7 RTS and CTS as GPIO in alternative configs -PE10 EXTERN_GPIO1 OUTPUT GPIO(1) ALT(2) # Cts7 pin as GPIO 1 (set RELAY_PINx = 1 to use it) -PE9 EXTERN_GPIO2 OUTPUT GPIO(2) ALT(2) # Rts7 pin as GPIO 2 (set RELAY_PINx = 2 to use it) -PE10 EXTERN_GPIO1 OUTPUT GPIO(1) ALT(3) # Cts7 pin as GPIO 1 (set RELAY_PINx = 1 to use it) -PE9 EXTERN_GPIO2 OUTPUT GPIO(2) ALT(3) # Rts7 pin as GPIO 2 (set RELAY_PINx = 2 to use it) +PE10 EXTERN_GPIO1 OUTPUT GPIO(1) ALT(2) # Cts7 pin as GPIO 1 (set RELAYx_PIN = 1 to use it) +PE9 EXTERN_GPIO2 OUTPUT GPIO(2) ALT(2) # Rts7 pin as GPIO 2 (set RELAYx_PIN = 2 to use it) +PE10 EXTERN_GPIO1 OUTPUT GPIO(1) ALT(3) # Cts7 pin as GPIO 1 (set RELAYx_PIN = 1 to use it) +PE9 EXTERN_GPIO2 OUTPUT GPIO(2) ALT(3) # Rts7 pin as GPIO 2 (set RELAYx_PIN = 2 to use it) # alternative configs: # 1: bidirectional receiver protocol on RX6 pin diff --git a/libraries/AP_HAL_ChibiOS/hwdef/QioTekAdeptF407/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/QioTekAdeptF407/defaults.parm index fc20ce1008..c268d8d015 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/QioTekAdeptF407/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/QioTekAdeptF407/defaults.parm @@ -12,12 +12,12 @@ BATT2_VOLT_MULT 20.000 BATT2_AMP_PERVLT 60.000 # setup the parameter for the two Relays GPIO others for reserve -RELAY_PIN 1 -RELAY_PIN2 2 -RELAY_PIN3 3 -RELAY_PIN4 4 -RELAY_PIN5 5 -RELAY_PIN6 6 +RELAY1_PIN 1 +RELAY2_PIN 2 +RELAY3_PIN 3 +RELAY4_PIN 4 +RELAY5_PIN 5 +RELAY6_PIN 6 # Disable the safety switch by default BRD_SAFETY_DEFLT 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/QioTekZealotH743-bdshot/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/QioTekZealotH743-bdshot/defaults.parm index 65b893da7c..6991631555 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/QioTekZealotH743-bdshot/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/QioTekZealotH743-bdshot/defaults.parm @@ -16,5 +16,5 @@ BATT2_VOLT_MULT 20.000 BATT2_AMP_PERVLT 17.000 # setup the parameter for the two Relays GPIO others for reserve -RELAY_PIN 1 -RELAY_PIN2 2 +RELAY1_PIN 1 +RELAY2_PIN 2 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/QioTekZealotH743/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/QioTekZealotH743/defaults.parm index 7e5dd045aa..ec79cb9dc2 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/QioTekZealotH743/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/QioTekZealotH743/defaults.parm @@ -5,5 +5,5 @@ BRD_HEAT_TARG 45 SERIAL2_BAUD 921600 # setup the parameter for the two Relays GPIO others for reserve -RELAY_PIN 1 -RELAY_PIN2 2 +RELAY1_PIN 1 +RELAY2_PIN 2 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/RADIX2HD/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/RADIX2HD/defaults.parm index b6cc0c5e93..4cbb8cacaa 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/RADIX2HD/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/RADIX2HD/defaults.parm @@ -13,4 +13,4 @@ SERIAL2_PROTOCOL 5 SERIAL4_PROTOCOL 16 # 9V regulator switch, ON on boot -RELAY_DEFAULT 1 +RELAY2_DEFAULT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/SDMODELH7V2/README.md b/libraries/AP_HAL_ChibiOS/hwdef/SDMODELH7V2/README.md index 14432f238a..cb45a3adc2 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/SDMODELH7V2/README.md +++ b/libraries/AP_HAL_ChibiOS/hwdef/SDMODELH7V2/README.md @@ -52,7 +52,7 @@ The SDMODEL SDH7 V2 supports OSD using OSD_TYPE 1 (MAX7456 driver).The defaults ## VTX Support The JST-GH-6P connector supports a standard DJI HD VTX connection. Pin 1 of the connector is 9v so be careful not to connect -this to a peripheral requiring 5v. The 9v supply is controlled by RELAY_PIN2 set to GPIO 81 and is on by default. It can be configured to be operated by an RC switch by selecting the function RELAY2. +this to a peripheral requiring 5v. The 9v supply is controlled by RELAY2_PIN set to GPIO 81 and is on by default. It can be configured to be operated by an RC switch by selecting the function RELAY2. ## Camera Control diff --git a/libraries/AP_HAL_ChibiOS/hwdef/SkystarsH7HD-bdshot/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/SkystarsH7HD-bdshot/defaults.parm index 63b7262cc4..9badc8d8c5 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/SkystarsH7HD-bdshot/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/SkystarsH7HD-bdshot/defaults.parm @@ -2,7 +2,8 @@ SERVO9_FUNCTION 120 NTF_LED_LEN 1 # Default VTX power to on -RELAY_DEFAULT 1 +RELAY2_DEFAULT 1 +RELAY3_DEFAULT 1 SERIAL3_PROTOCOL 16 RSSI_TYPE 3 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/defaults.parm index f350e21253..8f157e6661 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/defaults.parm @@ -146,8 +146,6 @@ RC4_MAX,1900 RC4_MIN,1100 RC6_OPTION,5 RC_PROTOCOLS,0 -RELAY_PIN,-1 -RELAY_PIN2,-1 RTL_ALT,1500 SCHED_LOOP_RATE,800 SERIAL1_BAUD,921 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-journey/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-journey/defaults.parm index 403b90d4eb..426a7f98ab 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-journey/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-journey/defaults.parm @@ -24,9 +24,10 @@ TMODE_FLAGS 63 TMODE_TMIN 0.9 # LEDs. pin0 is green, pin1 is red -RELAY_PIN 0 -RELAY_PIN2 1 -RELAY_DEFAULT 1 +RELAY1_PIN 0 +RELAY2_PIN 1 +RELAY1_DEFAULT 1 +RELAY2_DEFAULT 1 AHRS_ORIENTATION 2 COMPASS_EXTERNAL 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/defaults.parm index 85c94afc93..73a6dfd5a6 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/defaults.parm @@ -22,9 +22,10 @@ TMODE_FLAGS 23 TMODE_TMIN 0.9 # LEDs. pin54 is green, pin55 is red -RELAY_PIN 54 -RELAY_PIN2 55 -RELAY_DEFAULT 1 +RELAY1_PIN 54 +RELAY2_PIN 55 +RELAY1_DEFAULT 1 +RELAY2_DEFAULT 1 # Set to GPIO so they are used as RELAY SERVO5_FUNCTION -1 SERVO6_FUNCTION -1