Skip to content

Commit d3e1948

Browse files
committed
minor fixes with interpreter<->sys info pane
1 parent f34617d commit d3e1948

8 files changed

+298
-101
lines changed

FOSSAGSCP/include/Interpreter.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ class Interpreter : public QObject
5353
{
5454
Q_OBJECT
5555
public:
56-
Interpreter(Settings& settings, Ui::MainWindow* mainWindowUI, Ui::systeminformationpane* systemInfoPaneUI)
57-
: m_settings(settings), m_mainWindowUI(mainWindowUI), m_systemInfoUI(systemInfoPaneUI) {}
56+
Interpreter(Settings& settings, Ui::MainWindow* mainWindowUI);
5857
virtual ~Interpreter() {}
5958

59+
void SetSystemInformationPane(Ui::systeminformationpane* systemInfoPaneUI);
60+
6061
/// The ground station serial message is an internal command structure.
6162
/// This creates it from raw serial datagrams.
6263
/// @todo checks on the serial data length.
@@ -135,9 +136,10 @@ class Interpreter : public QObject
135136
signals:
136137
void ReceivedHandshake();
137138
void ReceivedSatelliteSystemInformation(IGroundStationSerialMessage* message);
139+
protected:
140+
Ui::MainWindow* m_mainWindowUI = nullptr;
138141
private:
139142
Settings& m_settings;
140-
Ui::MainWindow* m_mainWindowUI = nullptr;
141143
Ui::systeminformationpane* m_systemInfoUI = nullptr;
142144
QString m_satVersion = "FOSSASAT-2";
143145
};

FOSSAGSCP/mainwindow.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
1717
m_messageLogFrame->show();
1818

1919
// initialize the interpereter.
20-
m_interpreter = new Interpreter(m_settings, ui, m_sytemInfoPane->ui);
20+
assert(ui != nullptr);
21+
22+
m_interpreter = new Interpreter(m_settings, ui);
23+
m_interpreter->SetSystemInformationPane(m_sytemInfoPane->ui);
24+
m_sytemInfoPane->SetInterpreter(m_interpreter);
2125

2226
// initialize the 4 main tabs.
2327
this->LoadControlPanelSettingsUI();

FOSSAGSCP/mainwindow.ui

+74-36
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<enum>QTabWidget::Triangular</enum>
3434
</property>
3535
<property name="currentIndex">
36-
<number>0</number>
36+
<number>1</number>
3737
</property>
3838
<property name="elideMode">
3939
<enum>Qt::ElideRight</enum>
@@ -1360,6 +1360,9 @@
13601360
<property name="text">
13611361
<string>Disable</string>
13621362
</property>
1363+
<attribute name="buttonGroup">
1364+
<string notr="true">buttonGroup_6</string>
1365+
</attribute>
13631366
</widget>
13641367
</item>
13651368
<item row="5" column="0">
@@ -1374,20 +1377,29 @@
13741377
<property name="text">
13751378
<string>Enable</string>
13761379
</property>
1380+
<attribute name="buttonGroup">
1381+
<string notr="true">buttonGroup_9</string>
1382+
</attribute>
13771383
</widget>
13781384
</item>
13791385
<item row="3" column="1">
13801386
<widget class="QRadioButton" name="SatelliteControls_RunManeuver_EnableOverride_EulerAngleToleranceCheck_RadioButton">
13811387
<property name="text">
13821388
<string>Enable</string>
13831389
</property>
1390+
<attribute name="buttonGroup">
1391+
<string notr="true">buttonGroup_8</string>
1392+
</attribute>
13841393
</widget>
13851394
</item>
13861395
<item row="3" column="2">
13871396
<widget class="QRadioButton" name="SatelliteControls_RunManeuver_DisableOverride_EulerAngleToleranceCheck_RadioButton_2">
13881397
<property name="text">
13891398
<string>Disable</string>
13901399
</property>
1400+
<attribute name="buttonGroup">
1401+
<string notr="true">buttonGroup_8</string>
1402+
</attribute>
13911403
</widget>
13921404
</item>
13931405
<item row="5" column="1" colspan="2">
@@ -1398,20 +1410,29 @@
13981410
<property name="text">
13991411
<string>Enable</string>
14001412
</property>
1413+
<attribute name="buttonGroup">
1414+
<string notr="true">buttonGroup_7</string>
1415+
</attribute>
14011416
</widget>
14021417
</item>
14031418
<item row="1" column="1">
14041419
<widget class="QRadioButton" name="SatelliteControls_RunManeuver_EnableOverride_YAxisHbridgeFaultCheck_RadioButton">
14051420
<property name="text">
14061421
<string>Enable</string>
14071422
</property>
1423+
<attribute name="buttonGroup">
1424+
<string notr="true">buttonGroup_6</string>
1425+
</attribute>
14081426
</widget>
14091427
</item>
14101428
<item row="2" column="2">
14111429
<widget class="QRadioButton" name="SatelliteControls_RunManeuver_DisableOverride_ZAxisHbridgeFaultCheck_RadioButton">
14121430
<property name="text">
14131431
<string>Disable</string>
14141432
</property>
1433+
<attribute name="buttonGroup">
1434+
<string notr="true">buttonGroup_7</string>
1435+
</attribute>
14151436
</widget>
14161437
</item>
14171438
<item row="3" column="0">
@@ -1426,6 +1447,9 @@
14261447
<property name="text">
14271448
<string>Disable</string>
14281449
</property>
1450+
<attribute name="buttonGroup">
1451+
<string notr="true">buttonGroup_9</string>
1452+
</attribute>
14291453
</widget>
14301454
</item>
14311455
<item row="4" column="0">
@@ -1447,6 +1471,9 @@
14471471
<property name="text">
14481472
<string>Enable</string>
14491473
</property>
1474+
<attribute name="buttonGroup">
1475+
<string notr="true">buttonGroup_5</string>
1476+
</attribute>
14501477
</widget>
14511478
</item>
14521479
<item row="1" column="0">
@@ -1468,6 +1495,9 @@
14681495
<property name="text">
14691496
<string>Disable</string>
14701497
</property>
1498+
<attribute name="buttonGroup">
1499+
<string notr="true">buttonGroup_5</string>
1500+
</attribute>
14711501
</widget>
14721502
</item>
14731503
<item row="6" column="0" colspan="3">
@@ -1605,7 +1635,7 @@
16051635
<string>Disable</string>
16061636
</property>
16071637
<attribute name="buttonGroup">
1608-
<string notr="true">buttonGroup</string>
1638+
<string notr="true">buttonGroup_10</string>
16091639
</attribute>
16101640
</widget>
16111641
</item>
@@ -1615,7 +1645,7 @@
16151645
<string>Disable</string>
16161646
</property>
16171647
<attribute name="buttonGroup">
1618-
<string notr="true">buttonGroup_3</string>
1648+
<string notr="true">buttonGroup_2</string>
16191649
</attribute>
16201650
</widget>
16211651
</item>
@@ -1625,7 +1655,7 @@
16251655
<string>Disable</string>
16261656
</property>
16271657
<attribute name="buttonGroup">
1628-
<string notr="true">buttonGroup_2</string>
1658+
<string notr="true">buttonGroup</string>
16291659
</attribute>
16301660
</widget>
16311661
</item>
@@ -1635,7 +1665,7 @@
16351665
<string>Enable</string>
16361666
</property>
16371667
<attribute name="buttonGroup">
1638-
<string notr="true">buttonGroup_4</string>
1668+
<string notr="true">buttonGroup_3</string>
16391669
</attribute>
16401670
</widget>
16411671
</item>
@@ -1645,7 +1675,7 @@
16451675
<string>Enable</string>
16461676
</property>
16471677
<attribute name="buttonGroup">
1648-
<string notr="true">buttonGroup</string>
1678+
<string notr="true">buttonGroup_10</string>
16491679
</attribute>
16501680
</widget>
16511681
</item>
@@ -1655,7 +1685,7 @@
16551685
<string>Enable</string>
16561686
</property>
16571687
<attribute name="buttonGroup">
1658-
<string notr="true">buttonGroup_2</string>
1688+
<string notr="true">buttonGroup</string>
16591689
</attribute>
16601690
</widget>
16611691
</item>
@@ -1665,7 +1695,7 @@
16651695
<string>Enable</string>
16661696
</property>
16671697
<attribute name="buttonGroup">
1668-
<string notr="true">buttonGroup_3</string>
1698+
<string notr="true">buttonGroup_2</string>
16691699
</attribute>
16701700
</widget>
16711701
</item>
@@ -1675,7 +1705,7 @@
16751705
<string>Disable</string>
16761706
</property>
16771707
<attribute name="buttonGroup">
1678-
<string notr="true">buttonGroup_4</string>
1708+
<string notr="true">buttonGroup_3</string>
16791709
</attribute>
16801710
</widget>
16811711
</item>
@@ -2038,7 +2068,7 @@ tolerance check:</string>
20382068
<string>Temperature Switch Disabled</string>
20392069
</property>
20402070
<attribute name="buttonGroup">
2041-
<string notr="true">mpptTemperatureSwitchButtonGroup</string>
2071+
<string notr="true">buttonGroup_14</string>
20422072
</attribute>
20432073
</widget>
20442074
</item>
@@ -2048,7 +2078,7 @@ tolerance check:</string>
20482078
<string>&amp;Keep Alive Disabled</string>
20492079
</property>
20502080
<attribute name="buttonGroup">
2051-
<string notr="true">mpptKeepAliveButtonGroup</string>
2081+
<string notr="true">buttonGroup_15</string>
20522082
</attribute>
20532083
</widget>
20542084
</item>
@@ -2058,7 +2088,7 @@ tolerance check:</string>
20582088
<string>Keep Ali&amp;ve Enabled</string>
20592089
</property>
20602090
<attribute name="buttonGroup">
2061-
<string notr="true">mpptKeepAliveButtonGroup</string>
2091+
<string notr="true">buttonGroup_15</string>
20622092
</attribute>
20632093
</widget>
20642094
</item>
@@ -2068,7 +2098,7 @@ tolerance check:</string>
20682098
<string>Temperature Switch Enabled</string>
20692099
</property>
20702100
<attribute name="buttonGroup">
2071-
<string notr="true">mpptTemperatureSwitchButtonGroup</string>
2101+
<string notr="true">buttonGroup_14</string>
20722102
</attribute>
20732103
</widget>
20742104
</item>
@@ -2608,13 +2638,19 @@ Data stack</string>
26082638
<property name="text">
26092639
<string>Enabled</string>
26102640
</property>
2641+
<attribute name="buttonGroup">
2642+
<string notr="true">buttonGroup_12</string>
2643+
</attribute>
26112644
</widget>
26122645
</item>
26132646
<item row="2" column="2">
26142647
<widget class="QRadioButton" name="SatelliteConfig_Transmission_FSKMandated_Disabled_RadioButton">
26152648
<property name="text">
26162649
<string>Disabled</string>
26172650
</property>
2651+
<attribute name="buttonGroup">
2652+
<string notr="true">buttonGroup_12</string>
2653+
</attribute>
26182654
</widget>
26192655
</item>
26202656
<item row="1" column="2">
@@ -2623,7 +2659,7 @@ Data stack</string>
26232659
<string>Disabled</string>
26242660
</property>
26252661
<attribute name="buttonGroup">
2626-
<string notr="true">automatedStatisticsEnabledDisabledButtonGroup</string>
2662+
<string notr="true">buttonGroup_11</string>
26272663
</attribute>
26282664
</widget>
26292665
</item>
@@ -2633,7 +2669,7 @@ Data stack</string>
26332669
<string>Enabled</string>
26342670
</property>
26352671
<attribute name="buttonGroup">
2636-
<string notr="true">transmissionsEnabledDisabledButtonGroup</string>
2672+
<string notr="true">buttonGroup_4</string>
26372673
</attribute>
26382674
</widget>
26392675
</item>
@@ -2650,7 +2686,7 @@ Data stack</string>
26502686
<string>Disabled</string>
26512687
</property>
26522688
<attribute name="buttonGroup">
2653-
<string notr="true">transmissionsEnabledDisabledButtonGroup</string>
2689+
<string notr="true">buttonGroup_4</string>
26542690
</attribute>
26552691
</widget>
26562692
</item>
@@ -2660,7 +2696,7 @@ Data stack</string>
26602696
<string>Enabled</string>
26612697
</property>
26622698
<attribute name="buttonGroup">
2663-
<string notr="true">automatedStatisticsEnabledDisabledButtonGroup</string>
2699+
<string notr="true">buttonGroup_11</string>
26642700
</attribute>
26652701
</widget>
26662702
</item>
@@ -2734,7 +2770,7 @@ large packets:</string>
27342770
<string>Alternative Setting</string>
27352771
</property>
27362772
<attribute name="buttonGroup">
2737-
<string notr="true">spreadingFactorButtonGroup</string>
2773+
<string notr="true">buttonGroup_13</string>
27382774
</attribute>
27392775
</widget>
27402776
</item>
@@ -2744,7 +2780,7 @@ large packets:</string>
27442780
<string>Standard Setting</string>
27452781
</property>
27462782
<attribute name="buttonGroup">
2747-
<string notr="true">spreadingFactorButtonGroup</string>
2783+
<string notr="true">buttonGroup_13</string>
27482784
</attribute>
27492785
</widget>
27502786
</item>
@@ -3106,7 +3142,7 @@ Sleep Interval (mV):</string>
31063142
<property name="geometry">
31073143
<rect>
31083144
<x>265</x>
3109-
<y>-19</y>
3145+
<y>0</y>
31103146
<width>380</width>
31113147
<height>903</height>
31123148
</rect>
@@ -3812,26 +3848,28 @@ Sleep Interval (mV):</string>
38123848
<resources/>
38133849
<connections/>
38143850
<buttongroups>
3815-
<buttongroup name="dopplerShiftEnableDisableRadioButtonGroup"/>
3816-
<buttongroup name="buttonGroup_3"/>
3817-
<buttongroup name="automatedStatisticsEnabledDisabledButtonGroup"/>
3818-
<buttongroup name="mpptTemperatureSwitchButtonGroup"/>
3819-
<buttongroup name="transmissionsEnabledDisabledButtonGroup">
3820-
<property name="exclusive">
3821-
<bool>true</bool>
3822-
</property>
3823-
</buttongroup>
3824-
<buttongroup name="spreadingFactorButtonGroup"/>
3851+
<buttongroup name="buttonGroup_7"/>
3852+
<buttongroup name="retransmitSpreadingFactorButtonGroup"/>
3853+
<buttongroup name="retransmitBandwidthButtonGroup"/>
3854+
<buttongroup name="buttonGroup_6"/>
3855+
<buttongroup name="buttonGroup_5"/>
3856+
<buttongroup name="buttonGroup_8"/>
3857+
<buttongroup name="buttonGroup_14"/>
38253858
<buttongroup name="sendFullPictureButtonGroup"/>
3859+
<buttongroup name="buttonGroup_9"/>
3860+
<buttongroup name="buttonGroup_4"/>
38263861
<buttongroup name="buttonGroup"/>
38273862
<buttongroup name="retransmissionCodingRateButtonGroup"/>
3828-
<buttongroup name="gpsLogOldestOrNewestFirstButtonGroup"/>
3829-
<buttongroup name="mpptKeepAliveButtonGroup"/>
3830-
<buttongroup name="buttonGroup_2"/>
3831-
<buttongroup name="retransmitSpreadingFactorButtonGroup"/>
3863+
<buttongroup name="dopplerShiftEnableDisableRadioButtonGroup"/>
3864+
<buttongroup name="buttonGroup_15"/>
3865+
<buttongroup name="buttonGroup_3"/>
38323866
<buttongroup name="retransmitCRCEnabledButtonGroup"/>
3833-
<buttongroup name="retransmitBandwidthButtonGroup"/>
3834-
<buttongroup name="buttonGroup_4"/>
3867+
<buttongroup name="buttonGroup_10"/>
3868+
<buttongroup name="buttonGroup_11"/>
3869+
<buttongroup name="buttonGroup_2"/>
3870+
<buttongroup name="buttonGroup_13"/>
3871+
<buttongroup name="buttonGroup_12"/>
3872+
<buttongroup name="gpsLogOldestOrNewestFirstButtonGroup"/>
38353873
<buttongroup name="lowPowerModeButtonGroup"/>
38363874
</buttongroups>
38373875
</ui>

0 commit comments

Comments
 (0)