Repository navigation
MAVLink2 external rf - #7832
MAVLink2 external rf#7832slik wants to merge 15 commits into
Conversation
| static const uint16_t MAVLINK_PERIODS[MAVLINK_BAUDRATE_COUNT] = { | ||
| 16000, // 115200 -> 62 Hz | ||
| 4000, // 400000 -> 250 Hz | ||
| 2000, // 921600 -> 500 Hz |
There was a problem hiding this comment.
Whoah, the last two are pretty high frame-rates, somewhat unusual for a MAVLink link.
Is the plan to fly racing quads with MAVLink?
There was a problem hiding this comment.
I see, these are the same as CRSF values.
But I though of some points:
- ArduPilot already works fine with the same intervals while paired with a CRSF-capable receiver.
- It might cause confusion for users who are expecting the same update rates regardless the protocol
- ELRS allows to use up to 1000 Hz update rate in MAVLink mode
- MAVLink can (theoretically) be used on INAV or Betaflight racing quads
|
Please also consider proper MAVLink system and component ID handling. For more, please see: https://mavlink.io/en/services/mavlink_id_assignment.html |
Would you mind pointing us to the exact part you mean? We use common sysid:compid sets, e.g. 255:MAV_COMP_ID_RADIO and 1:MAV_COMP_ID_AUTOPILOT1 |
|
See: https://mavlink.io/en/messages/common.html#MAV_COMP_ID_TELEMETRY_RADIO and you might want to also read https://discuss.px4.io/t/what-is-and-how-does-one-select-a-system-id/6905/6 Have a look e.g. at mLRS system for reference: https://github.com/olliw42/mLRS-docu/blob/main/docs/MAVLINK_PARAMETERS.md and https://github.com/olliw42/mLRS-docu/blob/main/docs/PARAMETERS.md#rx-mav-system-id Do you plan to submit a PR to ExpressLRS with your mods, or is the plan to offer the RF module side support in your fork (only)? |
|
Configurable would be good indeed, as this way conflicts could easily be circumvented by the end-user. |
|
@rotorman Great, what do you have in mind? Is it source and target SYSIDs, or COMPIDs as well? |
|
Consider a practical use case, where over a single MAVLink stream multiple craft can be controlled. In general, MAVLink router functionality would also be very interesting, e.g. connecting to other MAVLink speaking devices either via USB-VCP or via AUX ports that some radios possess. |
|
With all my love to over-complicate things, I'm not sure we will see practical MAVLink multi-vehicle networks any time soon :) Regarding MAVLink routing, that'd definitely be a task for later. So far we probably should only add it to the ELRS side to work with existing Backpack functionality. |
|
@rotorman So what's your idea regarding (default) handset component ID? |
|
Have a look e.g. at mTX project (OpenTX fork with MAVLink additions) for pointers: https://github.com/olliw42/mTX-otx/blob/daa9c3cb9ca52b45ed3c2c45d0d649144a8ad1e9/radio/src/mavlink/mavlink_telem.h#L79-L80 |
|
I'm not sure we should use 254 as default system id, as it might require users to change Regarding component ID, |
|
Please consider that a handset can have multiple RF modules (most EdgeTX radios currently support internal and external RF modules at the same time), thus seeing a handset + RF module as a single item would not be ideal. |
|
Are there real world use cases though? |
|
@slik I cannot yet see a PR against ExpressLRS repo with your changes to see the reaction to your work from ELRS dev. team side. |
|
Hi! Would this also be relevant for using with mLRS? I would definitely also love to see a full MAVLink router on EdgeTX eventually. |
|
No, mLRS speaks either CRSF or mbridge, not the lingo this PR proposes. |
|
85e5c70 to
f48807c
Compare
|
@rotorman We have added configurable SRC and DST SYSID as you asked. Please check whether it looks good to you. |
|
Happy to see that you added end user selectable source SysID and target SysID options into the UI! In order to simplify testing for the interested parties, you could for now turn the MAVLINK feature on in this PR by default: This way, the binaries would be directly flashable, e.g. by using EdgeTX Buddy PR selection (including the optional MAVLINK feature of this PR): Waiting eagerly for your ELRS PR and the feedback from the ELRS dev. team to that upcoming PR. |
feat: MAVLink 2 external RF module
Adds MAVLink protocol support for external modules
RC_CHANNELS_OVERRIDEHEARTBEAT,SYS_STATUS,GPS_RAW_INT,ATTITUDE,VFR_HUDandRADIO_STATUSBuild option
-DMAVLINK=ON, off by defaultAlso ELRS TX MAVLink handset support:
elrs_mav.luaincluded in themavlink-handset)Tested: TX15; Zorro and TX12 mk2 require something to be turned off to fit, for example
-DGHOST=NO -DDSMP=NO