diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index dc53378a7662999d3014b512f5c5952d7288cfbe..1b5dd47a7234844fa98f4510817e546610999ad1 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -129,28 +129,47 @@ WindowsBuild { } # -# We treat all warnings as errors which must be fixed before proceeding. If you run into a problem you can't fix -# you can always use local pragmas to work around the warning. This should be used sparingly and only in cases where -# the problem absolultey can't be fixed. +# We treat all warnings as errors which must be fixed before pull requests are approved. If you run into a problem +# you can't fix you can always use local pragmas to work around the warning. This should be used sparingly and only +# in cases where the problem absolultey can't be fixed. # +# If you run into problems in code which is not yours, please lend a hand and fix the issues. If you don't have time +# for that post an Issue with your OS and compiler information as well as the pertinent output from the build log. If it's +# a problem that will take longer to fix, we will temporarily turn off warnings as errors for that specific config until +# the Issue is taken care of. Once that is completed we will turn warnings as errors back in for the config. You can use +# CONFIG+=WarningsAsErrorsOff in your private builds for a quick local override. +# +# Please report any problems you run into with warnings as errors so we can gather information on its effectiveness as well +# as its annoyance level. +# + +# Note: -Werror is currently not turned on for Linux due to unfixed problems with release builds. See Issue 535. This will +# be removed once the Issue is taken care of. + +LinuxBuild { + CONFIG += WarningsAsErrorsOff +} MacBuild | LinuxBuild { QMAKE_CXXFLAGS_WARN_ON += -Wall } -# Note: -Werror is currently not turned on for Linux due to unfixed problems with release builds - -MacBuild { - QMAKE_CXXFLAGS_WARN_ON += -Werror +MacBuild | LinuxBuild { + !WarningsAsErrorsOff { + QMAKE_CXXFLAGS_WARN_ON += -Werror + } } WindowsBuild { QMAKE_CXXFLAGS_WARN_ON += /W3 \ - /WX \ /wd4996 \ # silence warnings about deprecated strcpy and whatnot /wd4290 # ignore exception specifications } +WindowsBuild : !WarningsAsErrorsOff { + QMAKE_CXXFLAGS_WARN_ON += /WX +} + # # Build flavor specific settings # diff --git a/src/comm/MAVLinkSimulationMAV.cc b/src/comm/MAVLinkSimulationMAV.cc index c414633e32b5ef7cd6d957b6b00a7771dc4bbd35..51e2669b84e5a4b325e71a7a9d40d6fde5895238 100644 --- a/src/comm/MAVLinkSimulationMAV.cc +++ b/src/comm/MAVLinkSimulationMAV.cc @@ -86,6 +86,7 @@ void MAVLinkSimulationMAV::mainloop() servos.servo6_raw = 1500; servos.servo7_raw = 1500; servos.servo8_raw = 2000; + servos.port = 1; // set a fake port number mavlink_msg_servo_output_raw_encode(systemid, MAV_COMP_ID_IMU, &msg, &servos); link->sendMAVLinkMessage(&msg); @@ -164,15 +165,30 @@ void MAVLinkSimulationMAV::mainloop() mavlink_msg_attitude_encode(systemid, MAV_COMP_ID_IMU, &msg, &attitude); link->sendMAVLinkMessage(&msg); - + // SYSTEM STATUS mavlink_sys_status_t status; + + // Since the simulation outputs global position, attitude and raw pressure we specify that the + // sensors that would be collecting this information are present, enabled and healthy. + + status.onboard_control_sensors_present = MAV_SYS_STATUS_SENSOR_3D_GYRO | + MAV_SYS_STATUS_SENSOR_3D_ACCEL | + MAV_SYS_STATUS_SENSOR_3D_MAG | + MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE | + MAV_SYS_STATUS_SENSOR_GPS; + + status.onboard_control_sensors_enabled = status.onboard_control_sensors_present; + status.onboard_control_sensors_health = status.onboard_control_sensors_present; status.load = 300; - // status.mode = sys_mode; - // status.nav_mode = nav_mode; - status.errors_comm = 0; status.voltage_battery = 10500; - // status.status = sys_state; + status.current_battery = -1; // -1: autopilot does not measure the current + status.drop_rate_comm = 0; + status.errors_comm = 0; + status.errors_count1 = 0; + status.errors_count2 = 0; + status.errors_count3 = 0; + status.errors_count4 = 0; status.battery_remaining = 90; mavlink_msg_sys_status_encode(systemid, MAV_COMP_ID_IMU, &msg, &status); link->sendMAVLinkMessage(&msg); @@ -225,6 +241,13 @@ void MAVLinkSimulationMAV::mainloop() hil.pitch_elevator = 0.05f; hil.yaw_rudder = 0.05f; hil.throttle = 0.6f; + hil.aux1 = 0.0f; + hil.aux2 = 0.0f; + hil.aux3 = 0.0f; + hil.aux4 = 0.0f; + hil.mode = MAV_MODE_FLAG_HIL_ENABLED; + hil.nav_mode = 0; // not currently used by any HIL consumers + // Encode the data (adding header and checksums, etc.) mavlink_msg_hil_controls_encode(systemid, MAV_COMP_ID_IMU, &ret, &hil); // And send it