Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADSB: Add Unit Test #11782

Merged
merged 1 commit into from
Sep 6, 2024
Merged

ADSB: Add Unit Test #11782

merged 1 commit into from
Sep 6, 2024

Conversation

HTRamsey
Copy link
Collaborator

@HTRamsey HTRamsey commented Aug 19, 2024

Creates a unit test for ADSB
Remove need for restarting app when changing ADSB enabled setting
Better handling of TCPLink state
Change from Tool to Application Static to reduce linking and make better isolated/testable module
General code quality improvements

@HTRamsey HTRamsey force-pushed the dev-adsb branch 5 times, most recently from 474b774 to aa6b5bd Compare August 22, 2024 16:10
@HTRamsey HTRamsey marked this pull request as ready for review August 22, 2024 18:18
@HTRamsey HTRamsey requested a review from DonLakeFlyer August 22, 2024 18:18
}

_toolbox->adsbVehicleManager()->adsbVehicleUpdate(vehicleInfo);
(void) QMetaObject::invokeMethod(ADSBVehicleManager::instance(), "adsbVehicleUpdate", Qt::AutoConnection, vehicleInfo);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite get why this would be an invokeMethod. What is the reasoning behind when to use invokeMethod can when to call the method directly?

Copy link
Collaborator Author

@HTRamsey HTRamsey Sep 6, 2024

Choose a reason for hiding this comment

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

I believe it's mostly just standard Qt practice to call slots with that now, so that connection type can be handled automatically even if you know it will be a direct call. QtCreator even has a tool to automatically convert to invokeMethod now because of how often they use it in their source.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, still seems a bit odd. But I guess future-proof for possible changes on called object down the road.

@HTRamsey HTRamsey merged commit b3c4fa5 into mavlink:master Sep 6, 2024
8 checks passed
@HTRamsey HTRamsey deleted the dev-adsb branch September 6, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants