From 7e84b87877f925508dbed95d0b5440b05306cc07 Mon Sep 17 00:00:00 2001 From: rhunt <rhunt@iastate.edu> Date: Sun, 27 Mar 2022 23:41:42 +0200 Subject: [PATCH] graph ready --- groundStation/gui/MicroCART/mainwindow.cpp | 14 +++---- groundStation/gui/MicroCART/mainwindow.h | 2 +- groundStation/gui/MicroCART/mainwindow.ui | 46 +++++++++++++++++++--- 3 files changed, 48 insertions(+), 14 deletions(-) diff --git a/groundStation/gui/MicroCART/mainwindow.cpp b/groundStation/gui/MicroCART/mainwindow.cpp index 97219d050..5e5759df9 100644 --- a/groundStation/gui/MicroCART/mainwindow.cpp +++ b/groundStation/gui/MicroCART/mainwindow.cpp @@ -302,7 +302,7 @@ void MainWindow::updateTracker(float thrust, float pitch, float roll, float yaw, ui->currPitchRateActual->setText(QString::number(pitchRate)); ui->currRollRateActual->setText(QString::number(rollRate)); ui->currYawRateActual->setText(QString::number(yawRate)); - + } void MainWindow::on_pbStart_clicked() @@ -1065,11 +1065,11 @@ void MainWindow::graphLogs(QStringList logs) ui->dataPlot->addGraph(); ui->dataPlot->addGraph(); - ui->dataPlot->graph(0)->setPen(QPen(Qt::blue)); - ui->dataPlot->graph(1)->setPen(QPen(Qt::red)); - ui->dataPlot->graph(2)->setPen(QPen(Qt::green)); - ui->dataPlot->graph(3)->setPen(QPen(Qt::black)); - ui->dataPlot->graph(4)->setPen(QPen(Qt::yellow)); + ui->dataPlot->graph(0)->setPen(QPen(Qt::blue, 2)); + ui->dataPlot->graph(1)->setPen(QPen(Qt::red, 2)); + ui->dataPlot->graph(2)->setPen(QPen(Qt::green, 2)); + ui->dataPlot->graph(3)->setPen(QPen(Qt::black, 2)); + ui->dataPlot->graph(4)->setPen(QPen(Qt::yellow, 2)); qInfo() << "color" << endl; @@ -1460,7 +1460,7 @@ void MainWindow::on_pb_stopLog_clicked() { qInfo() << "Hello?" << endl; - QStringList test = {"0,10,50,25,NULL,NULL","1,NULL,NULL,NULL,NULL,NULL"}; + QStringList test = {"0,10,NULL,NULL,NULL,25","1,210,NULL,NULL,NULL,-10"}; graphLogs(test); } diff --git a/groundStation/gui/MicroCART/mainwindow.h b/groundStation/gui/MicroCART/mainwindow.h index 7be700dd3..f6ac9d2dc 100644 --- a/groundStation/gui/MicroCART/mainwindow.h +++ b/groundStation/gui/MicroCART/mainwindow.h @@ -53,7 +53,7 @@ private slots: void on_chooseBackend_clicked(); - void updateTracker(float x, float y, float z, float p, float r, float yaw); + void updateTracker(float thrust, float pitch, float roll, float yaw, float pitchRate, float rollRate, float yawRate); void updatePosAtt(); diff --git a/groundStation/gui/MicroCART/mainwindow.ui b/groundStation/gui/MicroCART/mainwindow.ui index 64b5edd94..33cbca219 100644 --- a/groundStation/gui/MicroCART/mainwindow.ui +++ b/groundStation/gui/MicroCART/mainwindow.ui @@ -33,7 +33,7 @@ </size> </property> <property name="currentIndex"> - <number>4</number> + <number>2</number> </property> <widget class="QWidget" name="backend"> <attribute name="title"> @@ -544,12 +544,18 @@ <rect> <x>162</x> <y>113</y> - <width>211</width> + <width>71</width> <height>20</height> </rect> </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> - <string>Yaw Scale: Deg / s</string> + <string>Yaw Scale:</string> </property> </widget> <widget class="QSpinBox" name="gamepadYawScale"> @@ -734,12 +740,12 @@ <rect> <x>720</x> <y>103</y> - <width>211</width> + <width>71</width> <height>20</height> </rect> </property> <property name="text"> - <string>Roll Scale: Deg</string> + <string>Roll Scale:</string> </property> </widget> <widget class="QSpinBox" name="gamepadPitchScale"> @@ -774,6 +780,32 @@ <string>Pitch Scale: Deg</string> </property> </widget> + <widget class="QLabel" name="label_4"> + <property name="geometry"> + <rect> + <x>294</x> + <y>114</y> + <width>54</width> + <height>17</height> + </rect> + </property> + <property name="text"> + <string>deg/s</string> + </property> + </widget> + <widget class="QLabel" name="label_9"> + <property name="geometry"> + <rect> + <x>852</x> + <y>104</y> + <width>54</width> + <height>17</height> + </rect> + </property> + <property name="text"> + <string>deg</string> + </property> + </widget> <zorder>pitchScaleLabel</zorder> <zorder>rollScaleLabel</zorder> <zorder>thrustScaleLabel</zorder> @@ -794,6 +826,8 @@ <zorder>thrustScaleNote</zorder> <zorder>gamepadRollScale</zorder> <zorder>gamepadPitchScale</zorder> + <zorder>label_4</zorder> + <zorder>label_9</zorder> </widget> <widget class="QWidget" name="plots"> <attribute name="title"> @@ -1237,7 +1271,7 @@ </widget> </item> <item row="0" column="1"> - <widget class="QLabel" name="currThrustLabel"> + <widget class="QLabel" name="currThrustActual"> <property name="text"> <string>N/A</string> </property> -- GitLab