-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
mission: import null as NaN #423
Conversation
When QGC sets a param as `null` it means unchanged which should translate to NaN for mavlink mission items.
We should add the functionality to support the yaw setting and then test this here as well.
According to @nicovanduijn this still doesn't work. |
@@ -1203,7 +1203,12 @@ Mission::Result MissionImpl::import_mission_items(Mission::mission_items_t &all_ | |||
// Extract parameters of each mission item | |||
std::vector<double> params; | |||
for (auto &p : json_mission_item["params"].array_items()) { | |||
params.push_back(p.number_value()); | |||
if (p.is_null()) { |
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.
Does this check for null
rightly ?
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.
From my tests, yes.
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.
Then, its fine.
I think QGC should stick to using NaN rather. Isn't it ? |
I think |
@shakthi-prashanth-m agreed? |
Oh yeah. Sure agreed. |
mission: import null as NaN
When QGC sets a param as
null
it means unchanged which shouldtranslate to NaN for mavlink mission items.
Fixes #422.