mirror of https://github.com/EspoTek/Labrador.git
User can manually set delay from oscilloscope->range->enter manually
This commit is contained in:
parent
662021ebab
commit
56aaa39bad
|
@ -1183,6 +1183,10 @@ void isoDriver::setTimeWindow(double newWindow){
|
|||
windowAtPause = window;
|
||||
}
|
||||
|
||||
void isoDriver::setDelay(double newDelay){
|
||||
delay = newDelay;
|
||||
}
|
||||
|
||||
void isoDriver::takeSnapshot(QString *fileName, unsigned char channel){
|
||||
if(channel==1){
|
||||
snapshotEnabled_CH1 = true;
|
||||
|
|
|
@ -182,6 +182,7 @@ public slots:
|
|||
void setTopRange(double newTop);
|
||||
void setBotRange(double newBot);
|
||||
void setTimeWindow(double newWindow);
|
||||
void setDelay(double newDelay);
|
||||
void takeSnapshot(QString *fileName, unsigned char channel);
|
||||
void rSourceChanged(int newSource);
|
||||
};
|
||||
|
|
|
@ -1073,6 +1073,7 @@ void MainWindow::on_actionEnter_Manually_triggered()
|
|||
connect(&dialog, SIGNAL(yTopUpdated(double)), ui->controller_iso, SLOT(setTopRange(double)));
|
||||
connect(&dialog, SIGNAL(yBotUpdated(double)), ui->controller_iso, SLOT(setBotRange(double)));
|
||||
connect(&dialog, SIGNAL(windowUpdated(double)), ui->controller_iso, SLOT(setTimeWindow(double)));
|
||||
connect(&dialog, SIGNAL(delayUpdated(double)), ui->controller_iso, SLOT(setDelay(double)));
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,5 +33,13 @@ void scopeRangeEnterDialog::toUpdateYBot(double val){
|
|||
void scopeRangeEnterDialog::toUpdateWindow(double val){
|
||||
qDebug() << val;
|
||||
windowUpdated(val);
|
||||
ui->delayBox->setMax(((double)MAX_WINDOW_SIZE) - ui->timeWindowBox->value());
|
||||
qDebug() << "delayBox updating to" << ui->delayBox->maximum();
|
||||
}
|
||||
|
||||
void scopeRangeEnterDialog::toUpdateDelay(double val){
|
||||
qDebug() << val;
|
||||
delayUpdated(val);
|
||||
ui->timeWindowBox->setMax(((double)MAX_WINDOW_SIZE) - ui->delayBox->value());
|
||||
qDebug() << "timeWindowBox updating max to" << ui->timeWindowBox->maximum();
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <QDialog>
|
||||
#include <QDebug>
|
||||
#include "desktop_settings.h"
|
||||
|
||||
//ScopeRangeEnterDialog is the class for the "Enter Scope Range" dialog (Oscilloscope->Range->Enter Manually; shortcut is "M").
|
||||
//This code in particular controls the voltageSpinBoxes in the dialog, to ensure they don't go out of range.
|
||||
|
@ -26,10 +27,12 @@ signals:
|
|||
void yTopUpdated(double val);
|
||||
void yBotUpdated(double val);
|
||||
void windowUpdated(double val);
|
||||
void delayUpdated(double val);
|
||||
private slots:
|
||||
void toUpdateYTop(double val);
|
||||
void toUpdateYBot(double val);
|
||||
void toUpdateWindow(double val);
|
||||
void toUpdateDelay(double val);
|
||||
};
|
||||
|
||||
#endif // SCOPERANGEENTERDIALOG_H
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>187</width>
|
||||
<height>147</height>
|
||||
<width>198</width>
|
||||
<height>170</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -72,6 +72,26 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="voltageSpinBox" name="delayBox">
|
||||
<property name="decimals">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000001000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Delay</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -213,10 +233,27 @@
|
|||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>delayBox</sender>
|
||||
<signal>valueChanged(double)</signal>
|
||||
<receiver>scopeRangeEnterDialog</receiver>
|
||||
<slot>toUpdateDelay(double)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>36</x>
|
||||
<y>106</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>18</x>
|
||||
<y>166</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>toUpdateYTop(double)</slot>
|
||||
<slot>toUpdateYBot(double)</slot>
|
||||
<slot>toUpdateWindow(double)</slot>
|
||||
<slot>toUpdateDelay(double)</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>187</width>
|
||||
<height>147</height>
|
||||
<width>198</width>
|
||||
<height>170</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -72,6 +72,26 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="voltageSpinBox" name="delayBox">
|
||||
<property name="decimals">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000001000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Delay</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -213,10 +233,27 @@
|
|||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>delayBox</sender>
|
||||
<signal>valueChanged(double)</signal>
|
||||
<receiver>scopeRangeEnterDialog</receiver>
|
||||
<slot>toUpdateDelay(double)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>36</x>
|
||||
<y>106</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>18</x>
|
||||
<y>166</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>toUpdateYTop(double)</slot>
|
||||
<slot>toUpdateYBot(double)</slot>
|
||||
<slot>toUpdateWindow(double)</slot>
|
||||
<slot>toUpdateDelay(double)</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
|
|
Loading…
Reference in New Issue