Commit 00d4bbe4 authored by Mark Whitehorn's avatar Mark Whitehorn

fix issue #2971

parent 61e24c4a
......@@ -1413,8 +1413,9 @@ void Vehicle::_updateAttitude(UASInterface*, double roll, double pitch, double y
_headingFact.setRawValue(0);
} else {
yaw = yaw * (180.0 / M_PI);
if (yaw < 0) yaw += 360;
_headingFact.setRawValue(yaw);
if (yaw < 0.0) yaw += 360.0;
// truncate to integer so widget never displays 360
_headingFact.setRawValue(trunc(yaw));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment