Commit f8ca6f64 authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #531 from DonLakeFlyer/WarningsAsErrors

Final Warnings fixed plus Warnings as Errors turned on
parents db719606 3d5c119d
......@@ -123,15 +123,13 @@ WindowsBuild {
#
MacBuild | LinuxBuild {
QMAKE_CXXFLAGS_WARN_ON += -Wall
}
MacBuild {
QMAKE_CXXFLAGS_WARN_ON += -Werror
QMAKE_CXXFLAGS_WARN_ON += -Wall \
-Werror
}
WindowsBuild {
QMAKE_CXXFLAGS_WARN_ON += /W3 \
/WX \
/wd4996 \ # silence warnings about deprecated strcpy and whatnot
/wd4290 # ignore exception specifications
}
......
......@@ -483,6 +483,7 @@ void MAVLinkSimulationLink::mainloop()
#ifdef MAVLINK_ENABLED_PIXHAWK
mavlink_pattern_detected_t detected;
detected.confidence = 5.0f;
detected.type = 0; // compiler confused into thinking type is used unitialized, bogus init to silence
if (detectionCounter == 10) {
char fileName[] = "patterns/face5.png";
......
......@@ -523,38 +523,29 @@ void MAVLinkSimulationWaypointPlanner::send_setpoint(uint16_t seq)
if(seq < waypoints->size()) {
mavlink_mission_item_t *cur = waypoints->at(seq);
mavlink_message_t msg;
mavlink_set_local_position_setpoint_t PControlSetPoint;
// send new set point to local IMU
if (cur->frame == 1) {
PControlSetPoint.target_system = systemid;
PControlSetPoint.target_component = MAV_COMP_ID_IMU;
PControlSetPoint.x = cur->x;
PControlSetPoint.y = cur->y;
PControlSetPoint.z = cur->z;
PControlSetPoint.yaw = cur->param4;
if (cur->frame == MAV_FRAME_LOCAL_NED || cur->frame == MAV_FRAME_LOCAL_ENU) {
mavlink_message_t msg;
mavlink_set_local_position_setpoint_t PControlSetPoint;
mavlink_msg_set_local_position_setpoint_encode(systemid, compid, &msg, &PControlSetPoint);
link->sendMAVLinkMessage(&msg);
} else {
//if (verbose) qDebug("No new set point sent to IMU because the new waypoint %u had no local coordinates\n", cur->seq);
PControlSetPoint.target_system = systemid;
PControlSetPoint.target_component = MAV_COMP_ID_IMU;
PControlSetPoint.x = cur->x;
PControlSetPoint.y = cur->y;
PControlSetPoint.z = cur->z;
PControlSetPoint.yaw = cur->param4;
PControlSetPoint.coordinate_frame = cur->frame;
mavlink_msg_set_local_position_setpoint_encode(systemid, compid, &msg, &PControlSetPoint);
link->sendMAVLinkMessage(&msg);
emit messageSent(msg);
uint64_t now = QGC::groundTimeMilliseconds();
timestamp_last_send_setpoint = now;
} else if (verbose) {
qDebug("No new set point sent to IMU because the new waypoint %u had no local coordinates\n", cur->seq);
}
uint64_t now = QGC::groundTimeMilliseconds();
timestamp_last_send_setpoint = now;
}
}
......
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