Skip to content

Commit 831462d

Browse files
committed
Fix all DDS ParameterType scope errors in AP_DDS_Client.cpp
1 parent 5d6d5b1 commit 831462d

2 files changed

Lines changed: 37 additions & 25 deletions

File tree

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: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ The UARTs are marked RXn and TXn in the above pinouts. The RXn pin is the receiv
4747

4848
| ArduPilot Serial | Hardware UART | Default Function | DMA Support | DMA Stream (Shared/Dedicated) |
4949
|------------------|----------------|------------------|-------------|------------------------------------------------|
50-
| SERIAL0 | OTG1 | USB | No | Handled by USB Controller |
50+
| SERIAL0 | OTG1 | USB | No | Handled by USB Controller |
5151
| SERIAL1 | UART7(CTS/RTS) | Telem 1 | Yes | Shared TX (Stream 7) / Dedicated RX (Stream 0) |
5252
| SERIAL2 | USART1 | GPS | Yes | Shared TX (Stream 7) / Shared RX (Stream 5) |
5353
| SERIAL3 | USART2 | Telem 2 | Yes | Shared TX (Stream 7) / Shared RX (Stream 6) |
5454
| SERIAL4 | USART3 | not available | Yes | Shared TX (Stream 7) / Shared RX (Stream 7) |
55-
| SERIAL5 | UART8 | ESC Telem | No NODMA | (CPU-based PIO) |
56-
| SERIAL6 | UART4 | User Port | No NODMA | (CPU-based PIO) |
55+
| SERIAL5 | UART8 | ESC Telem | No (NODMA) | (CPU-based PIO) |
56+
| SERIAL6 | UART4 | User Port | No (NODMA) | (CPU-based PIO) |
5757
| SERIAL7 | USART6 | RCIN | Yes | Shared TX (Stream 7) / Shared RX (Stream 1) |
5858

5959
Any UART can be re-tasked by changing its protocol parameter.
@@ -68,40 +68,52 @@ The PilotGaeaSH7V1 Supports onboard analog OSD using the AT7456 chip.The composi
6868

6969
## PWM Output and DShot
7070

71-
The PilotGaeaSH7V1 supports up to 11 PWM outputs.organized into 5 independent timer groups. All groups support DShot, but **Bi-directional DShot (BDShot)** is optimized for Groups 1-3.
71+
The PilotGaeaSH7V1 supports up to **11 physical PWM outputs**, organized into **6 independent timer groups**. All groups support DShot, but **Bi-directional DShot (BDShot)** is fully optimized for **Groups 1-4 (Outputs 1-8)**.
7272

7373
### PWM Grouping Table
7474

75-
| Group | PWM Output | Timer | BDShot Support (hwdef-bl) | Recommended Use |
75+
| Group | PWM Output | Timer | BDShot Support | Recommended Use |
7676
| :--- | :--- | :--- | :--- | :--- |
77-
| **1** | 1, 2 | TIM8 | **Full (DMA)** | Motors 1-2 |
78-
| **2** | 3, 4, 5, 6 | TIM5 | **Full (DMA)** | Motors 3-6 |
79-
| **3** | 7, 8 | TIM4 | **Full (DMA)** | Motors 7-8 |
80-
| **4** | 11, 12 | TIM15 | No (NODMA) | Servos / Auxiliary |
81-
| **5** | 13 (LED) | TIM1 | No (NODMA) | NeoPixel / WS2812 |
77+
| **1** | 1, 2 | TIM3 | **Full (DMA)** | Motors 1-2 (BDShot) |
78+
| **2** | 3, 4 | TIM2 | **Full (DMA)** | Motors 3-4 (BDShot) |
79+
| **3** | 5, 6 | TIM5 | **Full (DMA)** | Motors 5-6 (BDShot) |
80+
| **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 |
8283

8384
### Bi-directional DShot Configuration
8485
To use BDShot for RPM filtering, you must flash the `PilotGaeaSH7V1-bdshot` firmware.
8586
- **Outputs 1-8:** Fully optimized with dedicated DMA resources to ensure stable DShot600 performance and telemetry feedback.
8687
- **Outputs 11-13:** Configured with `NODMA`. While they support standard PWM/DShot, they do not support RPM telemetry. This design prioritizes DMA bandwidth for the primary IMU (SPI1) and core motor functions.
8788

88-
> **Note:** Every output within a group must use the same output protocol (e.g., if Output 3 is set to DShot, Outputs 4, 5, and 6 must also be DShot).
89+
> **Note:** PWM 9 and 10 are defined in firmware but not physically broken out.
90+
91+
> **Important:** Every output within a timer group must use the same protocol (e.g., Output 3 & 4 must both be DShot).
8992
9093
## Battery Monitoring
9194

9295
The board has two internal voltage sensors and two external current sensor input.
9396
The voltage sensors can handle up to 8S LiPo batteries.
97+
98+
Primary Battery (BATT):
9499
Enable Battery monitor with these parameter settings :
95-
* BATT_MONITOR 4
96-
Then reboot.
100+
* BATT_MONITOR 4 (Then reboot)
97101
* BATT_VOLT_PIN 10
98102
* BATT_CURR_PIN 11
99-
* BATT_VOLT_MULT 11
100-
* BATT_AMP_PERVLT 40
103+
* BATT_VOLT_MULT 11.0
104+
* BATT_AMP_PERVLT 40.0
105+
106+
Secondary Battery (BATT2):
101107
* BATT2_VOLT_PIN 18
102108
* BATT2_CURR_PIN 7
103-
* BATT2_VOLT_MULT 21
104-
* BATT2_AMP_PERVLT 40
109+
* BATT2_VOLT_MULT 21.0 (Must be manually set to 21.0)
110+
* BATT2_AMP_PERVLT 40.0
111+
112+
### Battery Monitoring (BATT2) Setup
113+
The second battery monitor is **disabled** by default. To use it:
114+
1. Set `BATT2_MONITOR` = **4** (Analog Voltage and Current) and reboot.
115+
2. **Crucial:** Change `BATT2_VOLT_MULT` to **21.0** in Mission Planner.
116+
*(The firmware default is 11.0, but the physical circuit on this board requires 21.0 for correct readings).*
105117

106118
## Compass
107119

0 commit comments

Comments
 (0)