Skip to content

Commit 2aba776

Browse files
committed
hwdef: update PilotGaeaSH7V1-bdshot definitions and add default params
1 parent 8d2cfde commit 2aba776

7 files changed

Lines changed: 1403 additions & 202 deletions

File tree

Tools/AP_Bootloader/board_types.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,3 +470,5 @@ AP_HW_CUAV-X25-EVO_ODID 17002
470470

471471
# do not allocate board IDs above 10,000 for non-ODID boards.
472472
# do not allocate board IDs above 19,999 in this file.
473+
474+
AP_HW_PilotGaeaSH7V1 1213

Tools/bootloaders/PilotGaeaSH7V1-bdshot_bl.hex

Lines changed: 1269 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/AC_PID/AC_PID.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ AC_PID::AC_PID(float initial_p, float initial_i, float initial_d, float initial_
113113
default_filt_D_hz(initial_filt_D_hz),
114114
default_slew_rate_max(initial_srmax)
115115
{
116+
(void)initial_srmax;
117+
(void)initial_srtau;
118+
116119
// load parameter values from eeprom
117120
AP_Param::setup_object_defaults(this, var_info);
118121

libraries/AP_DDS/AP_DDS_Client.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -910,13 +910,13 @@ void AP_DDS_Client::on_request(uxrSession* uxr_session, uxrObjectId object_id, u
910910
bool param_isinf = true;
911911
float param_value;
912912
switch (param.value.type) {
913-
case PARAMETER_INTEGER: {
913+
case ParameterType::PARAMETER_INTEGER: {
914914
param_isnan = isnan(param.value.integer_value);
915915
param_isinf = isinf(param.value.integer_value);
916916
param_value = float(param.value.integer_value);
917917
break;
918918
}
919-
case PARAMETER_DOUBLE: {
919+
case ParameterType::PARAMETER_DOUBLE: {
920920
param_isnan = isnan(param.value.double_value);
921921
param_isinf = isinf(param.value.double_value);
922922
param_value = float(param.value.double_value);
@@ -1009,38 +1009,38 @@ void AP_DDS_Client::on_request(uxrSession* uxr_session, uxrObjectId object_id, u
10091009

10101010
vp = AP_Param::find(param_key, &var_type);
10111011
if (vp == nullptr) {
1012-
get_parameters_response.values[i].type = PARAMETER_NOT_SET;
1012+
get_parameters_response.values[i].type = ParameterType::PARAMETER_NOT_SET;
10131013
successful_read &= false;
10141014
continue;
10151015
}
10161016

10171017
switch (var_type) {
10181018
case AP_PARAM_INT8: {
1019-
get_parameters_response.values[i].type = PARAMETER_INTEGER;
1019+
get_parameters_response.values[i].type = ParameterType::PARAMETER_INTEGER;
10201020
get_parameters_response.values[i].integer_value = ((AP_Int8 *)vp)->get();
10211021
successful_read &= true;
10221022
break;
10231023
}
10241024
case AP_PARAM_INT16: {
1025-
get_parameters_response.values[i].type = PARAMETER_INTEGER;
1025+
get_parameters_response.values[i].type = ParameterType::PARAMETER_INTEGER;
10261026
get_parameters_response.values[i].integer_value = ((AP_Int16 *)vp)->get();
10271027
successful_read &= true;
10281028
break;
10291029
}
10301030
case AP_PARAM_INT32: {
1031-
get_parameters_response.values[i].type = PARAMETER_INTEGER;
1031+
get_parameters_response.values[i].type = ParameterType::PARAMETER_INTEGER;
10321032
get_parameters_response.values[i].integer_value = ((AP_Int32 *)vp)->get();
10331033
successful_read &= true;
10341034
break;
10351035
}
10361036
case AP_PARAM_FLOAT: {
1037-
get_parameters_response.values[i].type = PARAMETER_DOUBLE;
1037+
get_parameters_response.values[i].type = ParameterType::PARAMETER_DOUBLE;
10381038
get_parameters_response.values[i].double_value = vp->cast_to_float(var_type);
10391039
successful_read &= true;
10401040
break;
10411041
}
10421042
default: {
1043-
get_parameters_response.values[i].type = PARAMETER_NOT_SET;
1043+
get_parameters_response.values[i].type = ParameterType::PARAMETER_NOT_SET;
10441044
successful_read &= false;
10451045
break;
10461046
}

libraries/AP_HAL_ChibiOS/hwdef/PilotGaeaSH7V1-bdshot/README.md

Lines changed: 62 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ The PilotGaeaSH7V1-bdshot is a flight controller designed and produced by PilotG
3232

3333
## Power supply
3434

35-
The PilotGaeaSH7V1-bdshot supports 3-8s Li battery input. It has 2 ways of BEC, which result in 3 ways of power supplys. Please see the table below.
35+
The PilotGaeaSH7V1-bdshot supports 3-8s Li battery input. It has 2 ways of BEC, which result in 3 ways of power supplies. Please see the table below.
3636

3737
| Power symbol | Power source | Max power (current) |
38-
|--------------|---------------------------------------------------|---------------------|
38+
| :--- | :--- | :--- |
3939
| BAT | directly from battery | |
4040
| 5V | from 5V BEC | 7.5W (1.5A) |
4141
| 8V | from 8V BEC, controlled by MCU | 12W (1.5A) |
@@ -45,26 +45,31 @@ The PilotGaeaSH7V1-bdshot supports 3-8s Li battery input. It has 2 ways of BEC,
4545

4646
The UARTs are marked RXn and TXn in the above pinouts. The RXn pin is the receive pin for UARTn. The TXn pin is the transmit pin for UARTn.
4747

48-
| ArduPilot Serial | Hardware UART | Default Function | DMA Support | DMA Stream (Shared/Dedicated) |
49-
|------------------|----------------|------------------|-------------|------------------------------------------------|
50-
| SERIAL0 | OTG1 | USB | No | Handled by USB Controller |
51-
| SERIAL1 | UART7(CTS/RTS) | Telem 1 | Yes | Shared TX (Stream 7) / Dedicated RX (Stream 0) |
52-
| SERIAL2 | USART1 | GPS | Yes | Shared TX (Stream 7) / Dedicated RX (Stream 5) |
53-
| SERIAL3 | USART2 | Telem 2 | Yes | Shared TX (Stream 7) / Dedicated RX (Stream 6) |
54-
| SERIAL4 | USART3 | not available | Yes | Shared TX (Stream 7) / Dedicated RX (Stream 7) |
55-
| SERIAL5 | UART8 | ESC Telem | No (NODMA) | (CPU-based PIO) |
56-
| SERIAL6 | UART4 | User Port | No (NODMA) | (CPU-based PIO) |
57-
| SERIAL7 | USART6 | RCIN | Yes | Shared TX (Stream 7) / Dedicated RX (Stream 1) |
48+
| ArduPilot Serial | Hardware UART | Default Function | DMA Support |
49+
| :--- | :--- | :--- | :--- |
50+
| SERIAL0 | OTG1 | USB | No |
51+
| SERIAL1 | UART7(CTS/RTS) | Telem 1 | Yes |
52+
| SERIAL2 | USART1 | Telem 2 | Yes |
53+
| SERIAL3 | USART2 | GPS | Yes |
54+
| SERIAL4 | EMPTY | None | N/A |
55+
| SERIAL5 | UART8 | ESC Telem | No (NODMA) |
56+
| SERIAL6 | UART4 | MSP/DisplayPort | No (NODMA) |
57+
| SERIAL7 | USART6 | RCIN | Yes |
5858

59-
Any UART can be re-tasked by changing its protocol parameter.
59+
> **NOTE:** Telem function is MAVLINK2 protocol. Any UART can be re-tasked by changing its protocol parameter.
6060
6161
## RC Input
6262

63-
The default RC input is configured on the USART6 and supports all RC protocols except PPM. The SBUS pin is inverted and connected to RX6. RC can be attached to any UART port as long as the serial port protocol is set to `SERIALn_PROTOCOL=23` and SERIAL6_Protocol is changed to something other than '23'.
63+
The default RC input is configured on USART6 and supports all RC protocols except PPM. The SBUS pin is hardware-inverted and connected to the RX6 pin.
64+
65+
RC input can be attached to any UART port. To reassign it:
66+
67+
1. Set the target port protocol to RC input (e.g., `SERIALn_PROTOCOL` = 23).
68+
2. Change `SERIAL6_PROTOCOL` to a different protocol (e.g., -1 or 2) to avoid resource conflicts.
6469

6570
## OSD Support
6671

67-
The PilotGaeaSH7V1-bdshot Supports onboard analog OSD using the AT7456 chip. The composited image is output via the VTX pin.
72+
The PilotGaeaSH7V1-bdshot Supports onboard analog OSD using the AT7456 chip. The composited image is output via the VTX pin. Simultaneous HD VTX DisplayPort is supported via SERIAL6.
6873

6974
## PWM Output and DShot
7075

@@ -78,50 +83,44 @@ The PilotGaeaSH7V1-bdshot supports up to **11 physical PWM outputs**, organized
7883
| **2** | 3, 4 | TIM2 | **Full (DMA)** | Motors 3-4 (BDShot) |
7984
| **3** | 5, 6 | TIM5 | **Full (DMA)** | Motors 5-6 (BDShot) |
8085
| **4** | 7, 8 | TIM4 | **Full (DMA)** | Motors 7-8 (BDShot) |
81-
| **5** | 11, 12 | TIM15 | No (NODMA) | Auxiliary / Servos |
82-
| **6** | 13 | TIM1 | No (NODMA) | NeoPixel / LED |
86+
| **5** | 13 | TIM1 | **Yes (DMA)*** | NeoPixel / LED (Default) |
87+
| **6** | 11, 12 | TIM15 | No, only can be PWM | Auxiliary / Servos |
8388

8489
### Bi-directional DShot Configuration
8590

8691
To use BDShot for RPM filtering, you must flash the `PilotGaeaSH7V1-bdshot` firmware.
8792

88-
- **Outputs 1-8:** Fully optimized with dedicated DMA resources to ensure stable DShot600 performance and telemetry feedback.
89-
- **Outputs 11-13:** Configured with `NODMA`. While they support standard PWM/DShot, they do not support RPM telemetry.
93+
- **Outputs 1-8:** Fully optimized with dedicated DMA streams and `TIMx_UP` support for stable DShot600 and bi-directional RPM telemetry.
94+
- **Outputs 9-12:** Configured with `NODMA`. These can only be used for standard PWM (servos) or GPIOs; they do not support DShot or RPM telemetry.
95+
- **Output 13:** Supports DMA but is pre-configured for Serial LED.
9096

91-
> **Note:** PWM 9 and 10 are defined in firmware but not physically broken out.
97+
> **Note:** PWM 9 and 10 are defined in firmware but not physically broken out on the board.
9298
>
93-
> **Important:** Every output within a timer group must use the same protocol (e.g., Output 3 & 4 must both be DShot).
99+
> **Note:** **PWM 13 (Group 5)** supports DMA, but is pre-configured for Serial LED ( `NTF_LED_TYPES` = **455** ) in default parameters to support onboard status lighting.
100+
>
101+
> **Important:** Every output within a timer group must use the same protocol (e.g., Output 3 & 4 must both be DShot or PWM).
94102
95103
## Battery Monitoring
96104

97105
The PilotGaeaSH7V1-bdshot features high-voltage monitoring capabilities, supporting up to 8S LiPo on both sensors. Notably, **BATT2** is optimized with a higher divider ratio for enhanced voltage range support.
98106

99107
### Primary Battery (BATT)
100108

101-
Enable Battery monitor with these parameter settings:
102-
103-
- BATT_MONITOR 4 (Then reboot)
104-
- BATT_VOLT_PIN 10
105-
- BATT_CURR_PIN 11
106-
- BATT_VOLT_MULT 11.0
107-
- BATT_AMP_PERVLT 40.0
109+
- `BATT_MONITOR`: **4** (Analog Voltage and Current)
110+
- `BATT_VOLT_PIN`: **10**
111+
- `BATT_CURR_PIN`: **11**
112+
- `BATT_VOLT_MULT`: **11.0**
113+
- `BATT_AMP_PERVLT`: **40.0**
108114

109115
### Secondary Battery (BATT2)
110116

111-
Enable Battery monitor with these parameter settings:
112-
113-
- BATT2_MONITOR 4 (Then reboot)
114-
- BATT2_VOLT_PIN 18
115-
- BATT2_CURR_PIN 7
116-
- BATT2_VOLT_MULT 21.0
117-
- BATT2_AMP_PERVLT 40.0
118-
119-
### Battery Monitoring (BATT2) Setup
120-
121-
The second battery monitor is **disabled** by default. To use it:
117+
To enable the second monitor, set the parameters below and **reboot** the flight controller:
122118

123-
1. Set `BATT2_MONITOR` = **4** (Analog Voltage and Current) and reboot.
124-
2. **Verification:** Confirm that `BATT2_VOLT_MULT` is set to **21.0**.
119+
- `BATT2_MONITOR`: **4**
120+
- `BATT2_VOLT_PIN`: **18**
121+
- `BATT2_CURR_PIN`: **7**
122+
- `BATT2_VOLT_MULT`: **21.0**
123+
- `BATT2_AMP_PERVLT`: **40.0**
125124

126125
## Compass
127126

@@ -131,19 +130,33 @@ The PilotGaeaSH7V1-bdshot has no built-in compass, so if needed, you should use
131130

132131
The PilotGaeaSH7V1-bdshot supports up to 2 cameras, connected to pin C1 and C2. You can select the video signal to VTX from camera by an RC channel. Set the parameters below:
133132

134-
- RELAY2_FUNCTION 1
135-
- RELAY_PIN2 82
136-
- RC8_OPTION 34
133+
- `RELAY2_FUNCTION`: **1**
134+
- `RELAY_PIN2`: **82** (PinIO 2)
135+
- `RC8_OPTION`: **34** (Relay2 On/Off)
137136

138137
## 8V switch
139138

140139
The 8V power supply can be controlled by an RC channel. Set the parameters below:
141140

142-
- RELAY1_FUNCTION 1
143-
- RELAY_PIN 81
144-
- RC7_OPTION 28
141+
- `RELAY1_FUNCTION`: **1**
142+
- `RELAY_PIN`: **81** (PinIO 1)
143+
- `RC7_OPTION`: **28** (Relay On/Off)
145144

146145
## Loading Firmware
147146

148-
Initial firmware load can be done with DFU by plugging in USB with the bootloader button pressed. Then you should load the "*with_bl.hex" firmware, using your favourite DFU loading tool.
149-
Once the initial firmware is loaded you can update the firmware using any ArduPilot ground station software. Updates should be done with the "*.apj" firmware files.
147+
The firmware target name is **`PilotGaeaSH7V1-bdshot`**.
148+
149+
### Initial Flash (DFU Mode)
150+
151+
If you are flashing this board for the first time or recovering from a corrupted bootloader, use DFU mode:
152+
153+
1. Connect the USB cable to your PC while holding down the physical **bootloader button**.
154+
2. Use a DFU loading tool (such as **STM32CubeProgrammer** or **Betaflight Configurator**) to load the `PilotGaeaSH7V1-bdshot_with_bl.hex` file.
155+
3. Once the flashing process is complete, the board will reboot into ArduPilot.
156+
157+
### Firmware Updates
158+
159+
For subsequent updates once the bootloader is present:
160+
161+
- **GCS Update:** Use Mission Planner or QGroundControl to upload the `PilotGaeaSH7V1-bdshot.apj` file.
162+
- **SD Card Update:** Alternatively, place the `latest.bin` or `firmware.bin` on the root of the MicroSD card to utilize the onboard auto-update feature.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SERVO13_FUNCTION 120
2+
3+
OSD_TYPE2 5

0 commit comments

Comments
 (0)