Commit 7303d617 authored by lm's avatar lm

A number of bugfixes for various MAVLink messages

parent 9af2c59b
*Makefile*
tags
build
Info.plist
obj
*.log
*~
*qtc*
bin/*.exe
bin/*.txt
bin/mac
*pro.user*
qrc_*.cpp
*.Debug
*.Release
tmp
debug
release
qgroundcontrol
mavlinkgen
*.wav
qgroundcontrol.xcodeproj/**
doc/html
doc/doxy.log
deploy/mac
deploy/linux
controller_log*
user_config.pri
*.app
*Makefile*
tags
build
Info.plist
obj
*.log
*~
*qtc*
bin/*.exe
bin/*.txt
bin/mac
*pro.user*
qrc_*.cpp
*.Debug
*.Release
tmp
debug
release
qgroundcontrol
mavlinkgen
*.wav
qgroundcontrol.xcodeproj/**
doc/html
doc/doxy.log
deploy/mac
deploy/linux
deploy/qgroundcontrol*
controller_log*
user_config.pri
*.app
*.ncb
*.vcproj
......@@ -39,4 +40,4 @@ user_config.pri
*.project
*.cproject
*.sln
*.suo
\ No newline at end of file
*.suo
#!/bin/sh
# Clean build directories
rm -rf mac
mkdir -p mac
# Change to build directory and compile application
cd ..
make -j4
# Copy and build the application bundle
cd deploy
cp -r ../bin/mac/qgroundcontrol.app mac/.
cp -r ../../qgroundcontrol-build-desktop/qgroundcontrol.app .
cp -r ../audio mac/qgroundcontrol.app/Contents/MacOs/.
mkdir -p mac/qgroundcontrol.app/Contents/Frameworks/
cp -r ../audio qgroundcontrol.app/Contents/MacOs/.
mkdir -p qgroundcontrol.app/Contents/Frameworks/
# SDL is not copied by Qt - for whatever reason
cp -r SDL.framework mac/qgroundcontrol.app/Contents/Frameworks/.
cp -r /Library/Frameworks/SDL.framework qgroundcontrol.app/Contents/Frameworks/.
echo -e '\n\nStarting to create disk image. This may take a while..\n'
macdeployqt mac/qgroundcontrol.app -dmg
rm -rf mac/qgroundcontrol.app
macdeployqt qgroundcontrol.app -dmg
#rm -rf qgroundcontrol.app
echo -e '\n\n QGroundControl .DMG file is now ready for publishing\n'
......@@ -50,11 +50,13 @@ macx {
COMPILER_VERSION = $$system(gcc -v)
#message(Using compiler $$COMPILER_VERSION)
CONFIG += x86 cocoa phonon
CONFIG -= x86_64
HARDWARE_PLATFORM = $$system(uname -a)
contains( $$HARDWARE_PLATFORM, "9.6.0" ) || contains( $$HARDWARE_PLATFORM, "9.7.0" ) || contains( $$HARDWARE_PLATFORM, "9.8.0" ) || contains( $$HARDWARE_PLATFORM, "9.9.0" ) {
# x86 Mac OS X Leopard 10.5 and earlier
CONFIG += x86 x86_64 cocoa phonon
#CONFIG -= x86_64
#message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)
# Enable function-profiling with the OS X saturn tool
......
......@@ -143,9 +143,13 @@ void MAVLinkSimulationMAV::mainloop()
// ATTITUDE
mavlink_attitude_t attitude;
attitude.usec = 0;
attitude.roll = 0.0f;
attitude.pitch = 0.0f;
attitude.yaw = yaw;
attitude.rollspeed = 0.0f;
attitude.pitchspeed = 0.0f;
attitude.yawspeed = 0.0f;
mavlink_msg_attitude_encode(systemid, MAV_COMP_ID_IMU, &msg, &attitude);
link->sendMAVLinkMessage(&msg);
......@@ -158,7 +162,7 @@ void MAVLinkSimulationMAV::mainloop()
status.packet_drop = 0;
status.vbat = 10500;
status.status = sys_state;
status.battery_remaining = 900;
mavlink_msg_sys_status_encode(systemid, MAV_COMP_ID_IMU, &msg, &status);
link->sendMAVLinkMessage(&msg);
timer10Hz = 5;
......@@ -183,8 +187,19 @@ void MAVLinkSimulationMAV::mainloop()
nav.wp_dist = 2.0f;
nav.alt_error = 0.5f;
nav.xtrack_error = 0.2f;
nav.aspd_error = 0.0f;
mavlink_msg_nav_controller_output_encode(systemid, MAV_COMP_ID_IMU, &msg, &nav);
link->sendMAVLinkMessage(&msg);
// RAW PRESSURE
mavlink_raw_pressure_t pressure;
pressure.press_abs = 1000;
pressure.press_diff1 = 2000;
pressure.press_diff2 = 5000;
pressure.temperature = 18150; // 18.15 deg Celsius
pressure.usec = 0; // Works also with zero timestamp
mavlink_msg_raw_pressure_encode(systemid, MAV_COMP_ID_IMU, &msg, &pressure);
link->sendMAVLinkMessage(&msg);
}
// 25 Hz execution
......@@ -203,6 +218,7 @@ void MAVLinkSimulationMAV::mainloop()
control_status.gps_fix = 2; // 2D GPS fix
control_status.position_fix = 3; // 3D fix from GPS + barometric pressure
control_status.vision_fix = 0; // no fix from vision system
control_status.ahrs_health = 230;
mavlink_msg_control_status_encode(systemid, MAV_COMP_ID_IMU, &ret, &control_status);
link->sendMAVLinkMessage(&ret);
#endif //MAVLINK_ENABLED_PIXHAWK
......
......@@ -620,10 +620,11 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
mavlink_raw_pressure_t pressure;
mavlink_msg_raw_pressure_decode(&message, &pressure);
quint64 time = this->getUnixTime(0);
quint64 time = this->getUnixTime(pressure.usec);
emit valueChanged(uasId, "abs pressure", "hPa", pressure.press_abs, time);
emit valueChanged(uasId, "diff pressure 1", "hPa", pressure.press_diff1, time);
emit valueChanged(uasId, "diff pressure 2", "hPa", pressure.press_diff2, time);
emit valueChanged(uasId, "temperature", "deg C", pressure.temperature/100.0f, time);
}
break;
case MAVLINK_MSG_ID_RC_CHANNELS_RAW:
......
......@@ -97,7 +97,7 @@ void QGCRemoteControlView::setUASId(int id)
{
// The UAS exists, disconnect any existing connections
disconnect(uas, SIGNAL(remoteControlChannelRawChanged(int,float,float)), this, SLOT(setChannel(int,float,float)));
disconnect(uas, SIGNAL(remoteControlRSSIRawChanged(float)), this, SLOT(setRemoteRSSI(float)));
disconnect(uas, SIGNAL(remoteControlRSSIChanged(float)), this, SLOT(setRemoteRSSI(float)));
disconnect(uas, SIGNAL(radioCalibrationRawReceived(const QPointer<RadioCalibrationData>)), calibrationWindow, SLOT(receive(const QPointer<RadioCalibrationData>&)));
disconnect(uas, SIGNAL(remoteControlChannelRawChanged(int,float)), calibrationWindow, SLOT(setChannelRaw(int,float)));
disconnect(uas, SIGNAL(remoteControlChannelScaledChanged(int,float,float)), calibrationWindow, SLOT(setChannelScaled(int,float)));
......@@ -116,9 +116,7 @@ void QGCRemoteControlView::setUASId(int id)
connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), this, SLOT(setChannelRaw(int,float)));
connect(newUAS, SIGNAL(remoteControlChannelRawChanged(int,float)), calibrationWindow, SLOT(setChannel(int,float)));
connect(newUAS, SIGNAL(remoteControlChannelScaledChanged(int,float)), this, SLOT(setChannelScaled(int,float)));
// connect(newUAS, SIGNAL(remoteControlChannelScaledChanged(int,float)), calibrationWindow, SLOT(setChannelScaled(int,float)));
}
}
......@@ -205,6 +203,8 @@ void QGCRemoteControlView::redraw()
{
progressBars.at(i)->setValue(normalized.at(i)*100.0f);
}
// Update RSSI
rssiBar->setValue(rssi*100);
updated = false;
}
}
......
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