Commit d06caab2 authored by Michael Carpenter's avatar Michael Carpenter

Test merge of Soren's PFD into mp_merge

parent ac110b79
......@@ -850,7 +850,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
if (!globalEstimatorActive) {
if ((vel < 1000000) && !isnan(vel) && !isinf(vel))
{
emit speedChanged(this, vel, 0.0, 0.0, time);
//emit speedChanged(this, vel, 0.0, 0.0, time);
setGroundSpeed(vel);
// TODO: Other sources also? Actually this condition does not quite belong here.
emit gpsSpeedChanged(this, vel, time);
......
......@@ -512,6 +512,7 @@ void MainWindow::buildCommonWidgets()
createDockWidget(simView,new UASControlWidget(this),tr("Control"),"UNMANNED_SYSTEM_CONTROL_DOCKWIDGET",VIEW_SIMULATION,Qt::LeftDockWidgetArea);
createDockWidget(plannerView,new UASListWidget(this),tr("Unmanned Systems"),"UNMANNED_SYSTEM_LIST_DOCKWIDGET",VIEW_MISSION,Qt::LeftDockWidgetArea);
createDockWidget(plannerView,new QGCWaypointListMulti(this),tr("Mission Plan"),"WAYPOINT_LIST_DOCKWIDGET",VIEW_MISSION,Qt::BottomDockWidgetArea);
{
//createDockWidget(plannerView,new QGCWaypointListMulti(this),tr("Mission Plan"),"WAYPOINT_LIST_DOCKWIDGET",VIEW_MISSION,Qt::BottomDockWidgetArea);
......@@ -593,7 +594,7 @@ void MainWindow::buildCommonWidgets()
// createDockWidget(simView,new HUD(320,240,this),tr("Head Up Display"),"HEAD_UP_DISPLAY_DOCKWIDGET",VIEW_SIMULATION,Qt::RightDockWidgetArea,this->width()/1.5);
createDockWidget(simView,new PrimaryFlightDisplay(320,240,this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_SIMULATION,Qt::RightDockWidgetArea,this->width()/1.5);
createDockWidget(pilotView,new UASListWidget(this),tr("Unmanned Systems"),"UNMANNED_SYSTEM_LIST_DOCKWIDGET",VIEW_FLIGHT,Qt::RightDockWidgetArea);
//createDockWidget(pilotView,new UASListWidget(this),tr("Unmanned Systems"),"UNMANNED_SYSTEM_LIST_DOCKWIDGET",VIEW_FLIGHT,Qt::RightDockWidgetArea);
// createDockWidget(pilotView,new HUD(320,240,this),tr("Head Up Display"),"HEAD_UP_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea,this->width()/1.8);
//createDockWidget(pilotView,new UASQuickView(this),tr("Quick View"),"UAS_INFO_QUICKVIEW_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
......@@ -602,6 +603,7 @@ void MainWindow::buildCommonWidgets()
//createDockWidget(pilotView,quickview,tr("Quick View"),"UAS_INFO_QUICKVIEW_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
createDockWidget(pilotView,new PrimaryFlightDisplay(320,240,this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea,this->width()/1.8);
QGCTabbedInfoView *infoview = new QGCTabbedInfoView(this);
infoview->addSource(mavlinkDecoder);
......@@ -609,7 +611,6 @@ void MainWindow::buildCommonWidgets()
//createDockWidget(pilotView,new HUD(320,240,this),tr("Head Up Display"),"HEAD_UP_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea,this->width()/1.8);
createDockWidget(pilotView,new PrimaryFlightDisplay(320,240,this),tr("Primary Flight Display"),"PRIMARY_FLIGHT_DISPLAY_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea,this->width()/1.8);
// createDockWidget(pilotView,new UASQuickView(this),tr("Quick View"),"UAS_INFO_QUICKVIEW_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
// createDockWidget(pilotView,new HSIDisplay(this),tr("Horizontal Situation"),"HORIZONTAL_SITUATION_INDICATOR_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
......
......@@ -58,7 +58,7 @@ PrimaryFlightDisplay::PrimaryFlightDisplay(int width, int height, QWidget *paren
font("Bitstream Vera Sans"),
refreshTimer(new QTimer(this)),
navigationCrosstrackError(INFINITY),
navigationCrosstrackError(0),
navigationTargetBearing(UNKNOWN_ATTITUDE),
layout(COMPASS_INTEGRATED),
......@@ -581,7 +581,7 @@ void PrimaryFlightDisplay::drawPitchScale(
QTransform savedTransform = painter.transform();
// find the mark nearest center
int snap = round(pitch/PITCH_SCALE_RESOLUTION)*PITCH_SCALE_RESOLUTION;
int snap = qRound((double)(pitch/PITCH_SCALE_RESOLUTION))*PITCH_SCALE_RESOLUTION;
int _min = snap-PITCH_SCALE_HALFRANGE;
int _max = snap+PITCH_SCALE_HALFRANGE;
for (int degrees=_min; degrees<=_max; degrees+=PITCH_SCALE_RESOLUTION) {
......@@ -784,7 +784,7 @@ void PrimaryFlightDisplay::drawAICompassDisk(QPainter& painter, QRectF area, flo
painter.drawRoundedRect(digitalCompassRect, instrumentEdgePen.widthF()*2/3, instrumentEdgePen.widthF()*2/3);
/* final safeguard for really stupid systems */
int digitalCompassValue = static_cast<int>(round(heading)) % 360;
int digitalCompassValue = static_cast<int>(qRound((double)heading)) % 360;
QString s_digitalCompass;
s_digitalCompass.sprintf("%03d", digitalCompassValue);
......
......@@ -130,25 +130,6 @@ void QGCVehicleConfig::generalMenuButtonClicked()
ui->stackedWidget->setCurrentIndex(ui->stackedWidget->count()-2);
}
void QGCVehicleConfig::advancedMenuButtonClicked()
{
ui->stackedWidget->setCurrentIndex(ui->stackedWidget->count()-1);
}
void QGCVehicleConfig::rcMenuButtonClicked()
{
ui->stackedWidget->setCurrentIndex(0);
}
void QGCVehicleConfig::sensorMenuButtonClicked()
{
ui->stackedWidget->setCurrentIndex(1);
}
void QGCVehicleConfig::generalMenuButtonClicked()
{
ui->stackedWidget->setCurrentIndex(ui->stackedWidget->count()-2);
}
void QGCVehicleConfig::advancedMenuButtonClicked()
{
ui->stackedWidget->setCurrentIndex(ui->stackedWidget->count()-1);
......@@ -161,9 +142,9 @@ QGCVehicleConfig::~QGCVehicleConfig()
void QGCVehicleConfig::setRCModeIndex(int newRcMode)
{
if (newRcMode > 0 && newRcMode < 5)
if (newRcMode > 0 && newRcMode < 6)
{
rc_mode = (enum RC_MODE) (newRcMode+1);
//rc_mode = (enum RC_MODE) (newRcMode+1);
changed = true;
}
}
......
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