76
76
#include < widgets/horizontalspinbox.h>
77
77
#include < widgets/registerblockwidget.h>
78
78
79
- enum AcquisitionDataKey
79
+ enum SensorDataKey
80
80
{
81
- RADIUS,
82
- ANGLE,
83
- TURNCOUNT,
84
81
ABSANGLE,
82
+ ANGLE,
83
+ ANGLESEC,
85
84
SINE,
86
85
COSINE,
87
86
SECANGLI,
88
87
SECANGLQ,
89
- ANGLESEC ,
88
+ RADIUS ,
90
89
DIAG1,
91
90
DIAG2,
92
91
TMP0,
93
92
TMP1,
94
- CNVCNT,
95
- SCRADIUS,
96
- SPIFAULT
93
+ CNVCNT
97
94
};
98
95
99
96
namespace scopy {
@@ -117,10 +114,10 @@ public Q_SLOTS:
117
114
void commandLogWrite (QString message = " " );
118
115
void updateFaultStatus (bool value);
119
116
void updateMotorPosition (double position);
120
- void updateDIGIOUI (uint16_t * registerValue);
121
- void updateFaultRegisterUI (uint16_t * registerValue);
122
- void updateMTDiagnosticRegisterUI (uint16_t * registerValue);
123
- void updateMTDiagnosticsUI (uint16_t * registerValue);
117
+ void updateDIGIOUI (quint16 registerValue);
118
+ void updateFaultRegisterUI (quint16 registerValue);
119
+ void updateMTDiagnosticRegisterUI (quint16 registerValue);
120
+ void updateMTDiagnosticsUI (quint16 registerValue);
124
121
Q_SIGNALS:
125
122
void runningChanged (bool );
126
123
void canCalibrateChanged (bool );
@@ -129,10 +126,10 @@ public Q_SLOTS:
129
126
void commandLogWriteSignal (QString message);
130
127
void updateFaultStatusSignal (bool value);
131
128
void motorPositionChanged (double position);
132
- void DIGIORegisterChanged (uint16_t * registerValue);
133
- void FaultRegisterChanged (uint16_t * registerValue);
134
- void DIAG1RegisterChanged (uint16_t * registerValue);
135
- void DIAG2RegisterChanged (uint16_t * registerValue);
129
+ void DIGIORegisterChanged (quint16 registerValue);
130
+ void FaultRegisterChanged (quint16 registerValue);
131
+ void DIAG1RegisterChanged (quint16 registerValue);
132
+ void DIAG2RegisterChanged (quint16 registerValue);
136
133
137
134
private:
138
135
ADMTController *m_admtController;
@@ -181,7 +178,9 @@ public Q_SLOTS:
181
178
182
179
QPlainTextEdit *logsPlainTextEdit, *commandLogPlainTextEdit;
183
180
184
- QCheckBox *acquisitionFaultRegisterLEDWidget, *calibrationFaultRegisterLEDWidget, *DIGIOBusyStatusLED,
181
+ QCheckBox *angleCheckBox, *absAngleCheckBox, *temp0CheckBox, *sineCheckBox, *cosineCheckBox, *radiusCheckBox,
182
+ *angleSecCheckBox, *secAnglQCheckBox, *secAnglICheckBox, *temp1CheckBox,
183
+ *acquisitionFaultRegisterLEDWidget, *calibrationFaultRegisterLEDWidget, *DIGIOBusyStatusLED,
185
184
*DIGIOCNVStatusLED, *DIGIOSENTStatusLED, *DIGIOACALCStatusLED, *DIGIOFaultStatusLED,
186
185
*DIGIOBootloaderStatusLED, *R0StatusLED, *R1StatusLED, *R2StatusLED, *R3StatusLED, *R4StatusLED,
187
186
*R5StatusLED, *R6StatusLED, *R7StatusLED, *VDDUnderVoltageStatusLED, *VDDOverVoltageStatusLED,
@@ -192,18 +191,25 @@ public Q_SLOTS:
192
191
193
192
QScrollArea *MTDiagnosticsScrollArea;
194
193
194
+ QWidget *acquisitionGraphChannelWidget;
195
+
196
+ QGridLayout *acquisitionGraphChannelGridLayout;
197
+
195
198
PlotWidget *acquisitionGraphPlotWidget, *angleErrorPlotWidget, *calibrationRawDataPlotWidget,
196
- *FFTAngleErrorPlotWidget, *correctedErrorPlotWidget, *postCalibrationRawDataPlotWidget,
197
- *FFTCorrectedErrorPlotWidget;
199
+ *FFTAngleErrorMagnitudePlotWidget, *FFTAngleErrorPhasePlotWidget, *correctedErrorPlotWidget,
200
+ *postCalibrationRawDataPlotWidget, *FFTCorrectedErrorMagnitudePlotWidget,
201
+ *FFTCorrectedErrorPhasePlotWidget;
198
202
PlotAxis *acquisitionXPlotAxis, *acquisitionYPlotAxis, *calibrationRawDataXPlotAxis,
199
- *calibrationRawDataYPlotAxis, *angleErrorXPlotAxis, *angleErrorYPlotAxis, *FFTAngleErrorXPlotAxis,
200
- *FFTAngleErrorYPlotAxis, *correctedErrorXPlotAxis, *correctedErrorYPlotAxis,
201
- *FFTCorrectedErrorXPlotAxis, *FFTCorrectedErrorYPlotAxis, *postCalibrationRawDataXPlotAxis,
203
+ *calibrationRawDataYPlotAxis, *angleErrorXPlotAxis, *angleErrorYPlotAxis,
204
+ *FFTAngleErrorMagnitudeXPlotAxis, *FFTAngleErrorMagnitudeYPlotAxis, *FFTAngleErrorPhaseXPlotAxis,
205
+ *FFTAngleErrorPhaseYPlotAxis, *correctedErrorXPlotAxis, *correctedErrorYPlotAxis,
206
+ *FFTCorrectedErrorMagnitudeXPlotAxis, *FFTCorrectedErrorMagnitudeYPlotAxis,
207
+ *FFTCorrectedErrorPhaseXPlotAxis, *FFTCorrectedErrorPhaseYPlotAxis, *postCalibrationRawDataXPlotAxis,
202
208
*postCalibrationRawDataYPlotAxis;
203
- PlotChannel *acquisitionAnglePlotChannel, *acquisitionABSAnglePlotChannel, *acquisitionTurnCountPlotChannel ,
204
- *acquisitionTmp0PlotChannel , *acquisitionTmp1PlotChannel , *acquisitionSinePlotChannel ,
205
- *acquisitionCosinePlotChannel , *acquisitionRadiusPlotChannel , *acquisitionSecAnglQPlotChannel ,
206
- *acquisitionSecAnglIPlotChannel , *angleErrorPlotChannel, *preCalibrationFFTPhasePlotChannel,
209
+ PlotChannel *acquisitionAnglePlotChannel, *acquisitionABSAnglePlotChannel, *acquisitionTmp0PlotChannel ,
210
+ *acquisitionTmp1PlotChannel , *acquisitionSinePlotChannel , *acquisitionCosinePlotChannel ,
211
+ *acquisitionRadiusPlotChannel , *acquisitionSecAnglQPlotChannel , *acquisitionSecAnglIPlotChannel ,
212
+ *acquisitionAngleSecPlotChannel , *angleErrorPlotChannel, *preCalibrationFFTPhasePlotChannel,
207
213
*calibrationRawDataPlotChannel, *calibrationSineDataPlotChannel, *calibrationCosineDataPlotChannel,
208
214
*FFTAngleErrorMagnitudeChannel, *FFTAngleErrorPhaseChannel, *correctedErrorPlotChannel,
209
215
*postCalibrationRawDataPlotChannel, *postCalibrationSineDataPlotChannel,
@@ -266,7 +272,7 @@ public Q_SLOTS:
266
272
void updateAcquisitionMotorRPM ();
267
273
void updateAcquisitionMotorRotationDirection ();
268
274
void getAcquisitionSamples (int sampleRate);
269
- double getAcquisitionParameterValue (const AcquisitionDataKey &key);
275
+ double getSensorDataAcquisitionValue (const ADMTController::SensorRegister &key);
270
276
void plotAcquisition (QVector<double > &list, PlotChannel *channel);
271
277
void prependAcquisitionData (const double &data, QVector<double > &list);
272
278
void resetAcquisitionYAxisScale ();
@@ -275,9 +281,10 @@ public Q_SLOTS:
275
281
void startAcquisitionUITask ();
276
282
void stopAcquisitionUITask ();
277
283
void updateSequenceWidget ();
284
+ void updateCapturedDataCheckBoxes ();
278
285
void applySequenceAndUpdate ();
279
286
void updateGeneralSettingEnabled (bool value);
280
- void connectCheckBoxToAcquisitionGraph (QCheckBox *widget, PlotChannel *channel, AcquisitionDataKey key);
287
+ void connectCheckBoxToAcquisitionGraph (QCheckBox *widget, PlotChannel *channel, SensorDataKey key);
281
288
void GMRReset ();
282
289
#pragma endregion
283
290
@@ -326,7 +333,7 @@ public Q_SLOTS:
326
333
void clearCalibrationSineCosine ();
327
334
void clearPostCalibrationSamples ();
328
335
void clearAngleErrorGraphs ();
329
- void clearCorrectedAngleErrorGraphs ();
336
+ void clearFFTAngleErrorGraphs ();
330
337
#pragma endregion
331
338
332
339
#pragma region Motor Methods
@@ -376,7 +383,6 @@ public Q_SLOTS:
376
383
void changeCustomSwitchLabel (CustomSwitch *customSwitch, QString onLabel, QString offLabel);
377
384
QCheckBox *createStatusLEDWidget (const QString &text, QVariant variant = true , bool checked = false ,
378
385
QWidget *parent = nullptr );
379
- MenuControlButton *createChannelToggleWidget (const QString title, QColor color, QWidget *parent = nullptr );
380
386
#pragma endregion
381
387
382
388
#pragma region Connect Methods
0 commit comments