diff --git a/src/ui/HSIDisplay.cc b/src/ui/HSIDisplay.cc index b4c8db92d033470748fc0811ee8a0eab33f33398..913b913d490be4aa6c5a001dd2d3d21b32208ef2 100644 --- a/src/ui/HSIDisplay.cc +++ b/src/ui/HSIDisplay.cc @@ -155,12 +155,12 @@ void HSIDisplay::paintDisplay() // Draw orientation labels // Translate and rotate coordinate frame painter.translate((xCenterPos)*scalingFactor, (yCenterPos)*scalingFactor); - painter.rotate((-yaw/(M_PI))*180.0f); + painter.rotate((yaw/(M_PI))*180.0f); paintText(tr("N"), ringColor, 3.5f, - 1.0f, - baseRadius - 5.5f, &painter); paintText(tr("S"), ringColor, 3.5f, - 1.0f, + baseRadius + 1.5f, &painter); paintText(tr("E"), ringColor, 3.5f, + baseRadius + 2.0f, - 1.75f, &painter); paintText(tr("W"), ringColor, 3.5f, - baseRadius - 5.5f, - 1.75f, &painter); - painter.rotate((yaw/(M_PI))*180.0f); + painter.rotate((-yaw/(M_PI))*180.0f); painter.translate(-(xCenterPos)*scalingFactor, -(yCenterPos)*scalingFactor); // Draw center indicator @@ -677,7 +677,7 @@ void HSIDisplay::drawWaypoints(QPainter& painter) pen.setColor(color); painter.setPen(pen); float radius = (waypointSize/2.0f) * 0.8 * (1/sqrt(2.0f)); - drawLine(p.x(), p.y(), p.x()+sin(yaw) * radius, p.y()-cos(yaw) * radius, refLineWidthToPen(0.4f), color, &painter); + drawLine(p.x(), p.y(), p.x()+sin(list.at(i)->getYaw()+yaw) * radius, p.y()-cos(list.at(i)->getYaw()+yaw) * radius, refLineWidthToPen(0.4f), color, &painter); drawPolygon(poly, &painter); // DRAW CONNECTING LINE diff --git a/src/ui/watchdog/WatchdogControl.cc b/src/ui/watchdog/WatchdogControl.cc index 1772e0aa155cc5f05abd43287989d0d714c217ba..572ecb8d87878241e49a4caf50becb8e173bb3b7 100644 --- a/src/ui/watchdog/WatchdogControl.cc +++ b/src/ui/watchdog/WatchdogControl.cc @@ -1,4 +1,6 @@ #include "WatchdogControl.h" +#include "WatchdogView.h" +#include "WatchdogProcessView.h" #include "ui_WatchdogControl.h" #include "PxQuadMAV.h" @@ -52,7 +54,8 @@ void WatchdogControl::updateWatchdog(int systemId, int watchdogId, unsigned int { watchdog.processes_ = std::vector(processCount); // Create new UI widget - //WatchdogView* view = new Watch + //WatchdogView* view = new WatchdogView(this); + } // start the timeout timer diff --git a/src/ui/watchdog/WatchdogControl.h b/src/ui/watchdog/WatchdogControl.h index 4ad6510f90be8508b8cf27450d6222a4398f9f57..544c341211f77aec0edf9c2e3968300739adea35 100644 --- a/src/ui/watchdog/WatchdogControl.h +++ b/src/ui/watchdog/WatchdogControl.h @@ -11,6 +11,8 @@ #include #include +#include "WatchdogView.h" + #include "UASInterface.h" namespace Ui { @@ -128,6 +130,7 @@ private: WatchdogInfo& getWatchdog(uint8_t system_id, uint16_t watchdog_id); std::map watchdogs_; ///< A map containing all watchdogs which are currently active + std::map views; QTimer updateTimer_; };