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

Add plugin warnings #439

Merged
merged 10 commits into from
Jul 8, 2018
Merged

Add plugin warnings #439

merged 10 commits into from
Jul 8, 2018

Conversation

julianoes
Copy link
Collaborator

By oversight we did not have the special warnings enabled for the plugins.

This enables the warnings again and fixes a few that crept in. And one was actually a bug so that confirms that warnings are important!

Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

Nice! Thanks a lot!

@@ -330,7 +330,7 @@ void CalibrationImpl::process_statustext(const mavlink_message_t &message)
// FALLTHROUGH
case CalibrationStatustextParser::Status::CANCELLED:
_calibration_callback = nullptr;
_state == State::NONE;
_state = State::NONE;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch :)

std::numeric_limits<float>::epsilon() &&
abs(lhs.velocity.north_m_s - rhs.velocity.north_m_s) <=
fabs(lhs.position.east_m - rhs.position.east_m) <=
Copy link
Collaborator

Choose a reason for hiding this comment

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

Right.

Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

Small comment, but generally fine for me.

#ifdef WINDOWS
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
// Instead of using the constant from math.h or cmath we define it ourselves. This way
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

MAVLinkParameters::ParamValue value;
value.set_uint32(mavlink_camera_mode);
value.set_uint32(uint32_t(mavlink_camera_mode));
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about static_cast<uint32_t>(mavlink_camera_mode)? Looks more modern to me 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

True.

@julianoes
Copy link
Collaborator Author

I'm merging this and ignoring the jenkins CI for the branch. I think it fails because it greps for warning which is the name of the branch and therefore triggers when it should no.

@julianoes julianoes merged commit ae6bed9 into develop Jul 8, 2018
@julianoes julianoes deleted the add-plugin-warnings branch July 8, 2018 06:55
rt-2pm2 pushed a commit to rt-2pm2/DronecodeSDK that referenced this pull request Nov 27, 2018
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