mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 14:19:57 +08:00
fix(vtx): Update peak thor parameter name and remove Rush MAX SOLO (#28692)
Rename the VTX_DEVICE entry for the Peak THOR so it lists the supported models, and drop the Rush MAX SOLO device entirely: its VTX_DEVICE enum value and the DEVICE_RUSH_MAX_SOLO constant in Vtx.msg. A stored VTX_DEVICE of 10240 (Rush MAX SOLO) is migrated to Generic with Tramp, the only protocol it speaks.
This commit is contained in:
1 parent
b9c745ffde
commit
1dbf64d67e
5 files changed
+18
-20
No files matched your search
@@ -281,16 +281,15 @@ The wire protocol and the device model are configured independently.
|
||||
|
||||
`VTX_DEVICE` selects the specific VTX model and only enables device-specific workarounds. Leave at Generic unless your VTX is listed
|
||||
|
||||
| Value | Device |
|
||||
| ------- | ------------- |
|
||||
| `0` | Generic |
|
||||
| `5120` | Peak THOR T67 |
|
||||
| `10240` | Rush MAX SOLO |
|
||||
| Value | Device |
|
||||
| ------ | ------------------------------ |
|
||||
| `0` | Generic |
|
||||
| `5120` | Peak THOR - T35, T67, T78, T89 |
|
||||
|
||||
Peak THOR devices speak SmartAudio and the Rush MAX SOLO speaks Tramp, so set `VTX_PROTOCOL` to match the model you select.
|
||||
Peak THOR devices speak SmartAudio, so set `VTX_PROTOCOL` to match the model you select.
|
||||
|
||||
### Known Device Workarounds
|
||||
|
||||
**Peak THOR T67** (`VTX_DEVICE` = 5120):
|
||||
This device incorrectly reports pit mode status but otherwise functions normally.
|
||||
**Peak THOR - T35, T67, T78, T89** (`VTX_DEVICE` = 5120):
|
||||
These devices incorrectly report pit mode status but otherwise function normally.
|
||||
The driver applies a workaround to override the reported status with the actual configured state.
|
||||
+1
-2
@@ -11,8 +11,7 @@ uint8 PROTOCOL_TRAMP = 100
|
||||
uint8 protocol
|
||||
|
||||
uint8 DEVICE_UNKNOWN = 0
|
||||
uint8 DEVICE_PEAK_THOR_T67 = 20
|
||||
uint8 DEVICE_RUSH_MAX_SOLO = 40
|
||||
uint8 DEVICE_PEAK_THOR = 20
|
||||
uint8 device
|
||||
|
||||
uint8 MODE_NORMAL = 0
|
||||
|
||||
@@ -324,7 +324,7 @@ void VTX::handle_uorb()
|
||||
strncpy((char *)msg.power_label, vtxtable().power_label(msg.power_level), sizeof(msg.power_label));
|
||||
|
||||
// Workarounds for specific devices
|
||||
if (_device == vtx_s::DEVICE_PEAK_THOR_T67) {
|
||||
if (_device == vtx_s::DEVICE_PEAK_THOR) {
|
||||
// This device always reports pit mode, but still works fine
|
||||
msg.frequency = vtxtable().frequency(_band, _channel);
|
||||
msg.mode = _pit_mode ? vtx_s::MODE_PIT : vtx_s::MODE_NORMAL;
|
||||
|
||||
@@ -141,7 +141,6 @@ parameters:
|
||||
# Note: values are due to legacy compatibility; keep in sync with msg/Vtx.msg
|
||||
values:
|
||||
0: Generic
|
||||
5120: Peak THOR T67
|
||||
10240: Rush MAX SOLO
|
||||
5120: Peak THOR - T35, T67, T78, T89
|
||||
default: 0
|
||||
reboot_required: true
|
||||
@@ -310,9 +310,10 @@ param_modify_on_import_ret param_modify_on_import(bson_node_t node)
|
||||
|
||||
// 2026-08-05: the protocol selection moved out of VTX_DEVICE into VTX_PROTOCOL. VTX_DEVICE keeps
|
||||
// the old layout that holds the device in its high byte, so only the protocol has to be derived:
|
||||
// the Peak THOR T67 speaks SmartAudio, the Rush MAX SOLO speaks Tramp. A value that is not listed
|
||||
// stays untouched and acts as a generic device on SmartAudio, which is what both parameters
|
||||
// default to, so the old value 0 needs nothing.
|
||||
// the Peak THOR speaks SmartAudio. The Rush MAX SOLO entry was removed and falls back to a generic
|
||||
// device on Tramp, the only protocol it speaks. A value that is not listed stays untouched and acts
|
||||
// as a generic device on SmartAudio, which is what both parameters default to, so the old value 0
|
||||
// needs nothing.
|
||||
{
|
||||
static constexpr int32_t PROTOCOL_SMART_AUDIO = 0; // VTX_PROTOCOL value, not in msg/Vtx.msg
|
||||
|
||||
@@ -326,13 +327,13 @@ param_modify_on_import_ret param_modify_on_import(bson_node_t node)
|
||||
protocol = vtx_s::PROTOCOL_TRAMP;
|
||||
break;
|
||||
|
||||
case 5120: // Peak THOR T67, SmartAudio only
|
||||
device = vtx_s::DEVICE_PEAK_THOR_T67 << 8;
|
||||
case 5120: // Peak THOR (T35, T67, T78, T89), SmartAudio only
|
||||
device = vtx_s::DEVICE_PEAK_THOR << 8;
|
||||
protocol = PROTOCOL_SMART_AUDIO;
|
||||
break;
|
||||
|
||||
case 10240: // Rush MAX SOLO, Tramp only
|
||||
device = vtx_s::DEVICE_RUSH_MAX_SOLO << 8;
|
||||
case 10240: // Rush MAX SOLO -> generic device, Tramp
|
||||
device = vtx_s::DEVICE_UNKNOWN << 8;
|
||||
protocol = vtx_s::PROTOCOL_TRAMP;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user