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

FlightTasks: switch to uORB::Subscription #13039

Merged
merged 3 commits into from
Sep 30, 2019
Merged

FlightTasks: switch to uORB::Subscription #13039

merged 3 commits into from
Sep 30, 2019

Conversation

dagar
Copy link
Member

@dagar dagar commented Sep 28, 2019

Switching to uORB::Subscription from uORB::SubscriptionPollable is slightly faster and safer. There are no dynamic allocations, so we can get rid of the SubscriptionArray. The minor downside in this case is that there isn't a helper to update all of them in a single pass, so each needs to be updated in updateInitialize().

This is working towards removing SubscriptionPollable entirely. It's a wrapper around the orb C api.

@dagar
Copy link
Member Author

dagar commented Sep 29, 2019

This also saves about 1.1 KB of flash on fmu-v2.

bkueng
bkueng previously approved these changes Sep 30, 2019
Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

Generally looks good to me.

src/lib/FlightTasks/FlightTasks.hpp Outdated Show resolved Hide resolved
@dagar
Copy link
Member Author

dagar commented Sep 30, 2019

@PX4/testflights could you test this across all the normal multicopter modes?

@dagar dagar requested a review from a team September 30, 2019 13:20
@jorge789
Copy link

Tested on PixRacer V4:

Flight Card 1

Modes Tested:
Position Mode: Good.
Altitude Mode: Good.
Stabilized Mode: Good.

Procedure:
Arm in position mode, check take off behavior (Vehicle should stay on the ground as long as the throttle stick is at the middle or below, and start to ascend smoothly as long as throttle stick as above the middle.), the land and disarm.
Same procedure was repeated with Altitude and Stabilized mode.

Notes:
No issues were noted, good flight in general.

Flight Card 2

Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.

Procedure
Arm and Take off in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.

Note:
No issues were noted, good flight in general.

Flight Card 3

Modes Tested
Position Mode: Good.
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.

Procedure
Arm and Take off in position mode, after flying for approximately one minute, switched to mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.

Note:
No issues were noted, good flight in general.

Flight Card 4
Tested Fail safe:

Procedure
The radio control turned off and the vehicle returned and landed correctly.
Tested good.

Logs:
Flight card 1: https://review.px4.io/plot_app?log=b42f99c1-730a-4ae1-9caa-660ee001055c
Flight card 1: https://review.px4.io/plot_app?log=c31bed71-ac08-40e0-8f65-1b57dd19bbf2

Flight card 2: https://review.px4.io/plot_app?log=54654f33-f74d-4e12-89d7-7d3d08f684fc
Flight card 2: https://review.px4.io/plot_app?log=5c1225d9-16ff-4117-a241-6b23da9a0e7b

Flight card 3: https://review.px4.io/plot_app?log=ad324476-f95c-44ba-bf92-6c03ec8df39b
Flight card 3: https://review.px4.io/plot_app?log=5e623620-2d15-4603-95fd-586e109814e0

Flight card 4: https://review.px4.io/plot_app?log=baa4ab5b-e500-4dac-930e-19154ae7e240
Flight card 4: https://review.px4.io/plot_app?log=f095db29-19cf-4acb-b875-f1db632fd3bd

@dannyfpv
Copy link

Tested on Pixhawk4 V5:
Flight Card 1

Modes Tested:
Position Mode: Good.
Altitude Mode: Good.
Stabilized Mode: Good.

Procedure:
Arm in position mode, check take off behavior (Vehicle should stay on the ground as long as the throttle stick is at the middle or below, and start to ascend smoothly as long as throttle stick as above the middle.), the land and disarm.
Same procedure was repeated with Altitude and Stabilized mode.

Notes:
No issues were noted, good flight in general.

Flight Card 2

Modes Tested
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.

Procedure
Arm and Take off in mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.

Note:
No issues were noted, good flight in general.

Flight Card 3

Modes Tested
Position Mode: Good.
Mission Plan Mode (Automated): Good.
RTL (Return To Land): Good.

Procedure
Arm and Take off in position mode, after flying for approximately one minute, switched to mission plan mode then make sure that vehicle follows all waypoints as shown in QGC, once completed all waypoint see landing behavior.

Note:
No issues were noted, good flight in general.

Flight Card 4
Tested Fail safe:

Procedure
The radio control turned off and the vehicle returned and landed correctly.
Tested good.

Logs:
Flight card 1:
https://review.px4.io/plot_app?log=84421f12-0c88-4582-b244-885c6b8d01c7
Flight card 2:
https://review.px4.io/plot_app?log=68870e63-859a-47e1-b8d0-2421256e35d1
Flight card 3:
https://review.px4.io/plot_app?log=d0c0c256-e0c1-447b-8a44-76675ffccc40
Flight card 4:
https://review.px4.io/plot_app?log=d66ebf2c-8f21-46e2-a1db-9bfbbcdfd653

@dagar
Copy link
Member Author

dagar commented Sep 30, 2019

Thanks everyone.

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.

4 participants