ExpressLRS / ExpressLRS

STM32/ESP32/ESP8285-based High-Performance Radio Link for RC applications
GNU General Public License v3.0
3.55k stars 878 forks source link

When in Mavlink Serial RC mode and SYSID_THISMAV of vehicle is different than 1, RC does not work #2890

Closed mariansoban closed 1 week ago

mariansoban commented 4 weeks ago

Current Behavior

If Mavlink vehicle has configured different SYSID_THISMAV than default value of 1, RC link for Mavlink RC serial does not work, Mavlink telemetry works.

Steps to Reproduce

  1. Configure ELRS for Mavlink serial communication with parameter Link Mode: MAVLink

  2. E.g. for the fixed wing plane with Ardupilot FW v4.5.5 configure ELRS RC for Mavlnik 2, with parameters: SERIAL1_PROTOCOL, 2 # MAVLink2 SERIAL1_BAUD,460 RSSI_TYPE, 3 #TelemetryRadioRSSI

  3. Set vehicle parameter _SYSIDTHISMAV to value different than default 1, e.g. 10: SYSID_THISMAV, 10

Possible Solution (Not obligatory)

It would be nice to have possibility to configure _SYSIDTHISMAV parameter value for ELRS, see line: https://github.com/ExpressLRS/ExpressLRS/blob/master/src/src/rx-serial/SerialMavlink.cpp#L57 Full code from src/src/rx-serial/SerialMavlink.cpp:

SerialMavlink::SerialMavlink(Stream &out, Stream &in):
    SerialIO(&out, &in),
    // 255 is typically used by the GCS, for RC override to work in ArduPilot `SYSID_MYGCS` must be set to this value (255 is the default)
    this_system_id(255),
    // Strictly this is not a valid source component ID
    this_component_id(MAV_COMPONENT::MAV_COMP_ID_ALL),
    // Assume vehicle system ID is 1, ArduPilot's `SYSID_THISMAV` parameter. (1 is the default)
    target_system_id(1),
    // Send to AutoPilot component
    target_component_id(MAV_COMPONENT::MAV_COMP_ID_AUTOPILOT1)
{
}

Details

Your Environment

JyeSmith commented 4 weeks ago

Can you please test this PR https://github.com/ExpressLRS/ExpressLRS/pull/2886

github-actions[bot] commented 1 week ago

This issue was closed because it has been inactive for 12 days since being marked as closing.