Skip to content

Conversation

@MUSTARDTIGERFPV
Copy link
Member

image

mha1
mha1 previously requested changes Oct 11, 2024
Copy link
Contributor

@mha1 mha1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could further reduce this by deleting lines 536 and 537 and change the following if statement to be if (config.GetSerialProtocol() == PROTOCOL_MAVLINK)

Comment on lines 537 to 539
bool hasMavlink = prot0 == PROTOCOL_MAVLINK;
#if defined(PLATFORM_ESP32)
eSerial1Protocol prot1 = config.GetSerial1Protocol();
hasMavlink = hasMavlink || (prot1 == PROTOCOL_MAVLINK);
#endif

if (hasMavlink)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, these should always be registered i.e. no if block.
And at the end of event loop the fields should be shown/hidden depending on the protocol selected, similar to the backpack options on the TX side of things.

@pkendall64 pkendall64 requested review from mha1 and pkendall64 October 20, 2024 21:23
@pkendall64 pkendall64 dismissed mha1’s stale review October 20, 2024 21:24

Changes have been made

@mha1 mha1 merged commit 9186570 into 3.x.x-maintenance Oct 21, 2024
@mha1 mha1 deleted the mavlink-serial1-fix branch October 21, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants