diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 587db0a5ce451f68a9bd38eba6ccd24a92d34f99..f44bfb65ee7cfb59eb0a0543d11a93bc957d2924 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -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); diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index bcf55e1bbdd4ae187af43f1a22e578e95ca2a1b2..7184ebfc4df7c23b47bf7a1ebbad7c1724934aaf 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -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); diff --git a/src/ui/PrimaryFlightDisplay.cpp b/src/ui/PrimaryFlightDisplay.cpp index de82c6e674c7f954b05f7231665407f9fcf11d8a..71c41575c24ed6e7a168a755c4191370966e5b3f 100644 --- a/src/ui/PrimaryFlightDisplay.cpp +++ b/src/ui/PrimaryFlightDisplay.cpp @@ -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(round(heading)) % 360; + int digitalCompassValue = static_cast(qRound((double)heading)) % 360; QString s_digitalCompass; s_digitalCompass.sprintf("%03d", digitalCompassValue); diff --git a/src/ui/QGCVehicleConfig.cc b/src/ui/QGCVehicleConfig.cc index e110718a76a16a2d59d7743c63ba9db53e0bddcf..282f18e9f79aa07111dd8aa834b5562fdc48acda 100644 --- a/src/ui/QGCVehicleConfig.cc +++ b/src/ui/QGCVehicleConfig.cc @@ -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; } }