-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
integration_tests: add checks to takeoff/land test #98
Conversation
integration_tests/simple_hover.cpp
Outdated
|
||
Device &device = dc.device(); | ||
|
||
while (!device.telemetry().health_all_ok()) { | ||
for (int i = 0; ; ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FMI, why not a while loop? Seem odd to see an infinite for loop :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore that, I see you want to count out 10 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yer it's a bit ugly but I haven't found a prettier way yet.
An alternative is to use the async interface and then do a wait_for
on the promise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not prettier, but perhaps a little more intuitive
int itter=0;
while (!device.telemetry().health_all_ok()) {
std::cout << "waiting for device to be ready" << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(1));
ASSERT_LT(++itter, 10);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yer, you're right. That's nicer. I'll change it.
Old debug info text had typo ("success, not "sucess") but in any case was not useful because there was no information about the context of the success.
This adds a sync interface for the connection status of a device. It is basically the same information as also covered by the async methods on_discover and on_timeout.
This adds some checks to the ActionSimpleHover tests to actually check what PX4 SITL is executing rather than just checking if we get the correct responses. This could be an example for CI tests for PX4 using DroneCore.
c30b12a
to
594411d
Compare
Replaced by #110. |
This adds some checks to the ActionSimpleHover tests to actually check
what PX4 SITL is executing rather than just checking if we get the
correct responses.
This could be an example for CI tests for PX4 using DroneCore.
@dagar have a look
To test this:
Or if you have Firmware and DroneCore next to each other in a folder: