mirror of https://github.com/EspoTek/Labrador.git
Fixed trigger for Multimeter++
This commit is contained in:
parent
d04da3748d
commit
f6901671f4
|
@ -593,7 +593,7 @@ void isoDriver::setTriggerEnabled(bool enabled)
|
|||
|
||||
void isoDriver::setTriggerLevel(double level)
|
||||
{
|
||||
internalBuffer375_CH1->setTriggerLevel(level, 128, AC_CH1);
|
||||
internalBuffer375_CH1->setTriggerLevel(level, (driver->deviceMode == 7 ? 2048 : 128), AC_CH1);
|
||||
internalBuffer375_CH2->setTriggerLevel(level, 128, AC_CH2);
|
||||
internalBuffer750->setTriggerLevel(level, 128, AC_CH1);
|
||||
triggerStateChanged();
|
||||
|
@ -770,7 +770,18 @@ void isoDriver::multimeterAction(){
|
|||
}
|
||||
|
||||
double triggerDelay = 0;
|
||||
readData375_CH1 = internalBuffer375_CH1->readBuffer(display.window,GRAPH_SAMPLES, false, display.delay + ((triggerEnabled&&!paused_multimeter) ? triggerDelay + display.window/2 : 0));
|
||||
if (triggerEnabled)
|
||||
{
|
||||
triggerDelay = internalBuffer375_CH1->getDelayedTriggerPoint(display.window) - display.window;
|
||||
|
||||
if (triggerDelay < 0)
|
||||
triggerDelay = 0;
|
||||
}
|
||||
|
||||
if(singleShotEnabled && (triggerDelay != 0))
|
||||
singleShotTriggered(1);
|
||||
|
||||
readData375_CH1 = internalBuffer375_CH1->readBuffer(display.window,GRAPH_SAMPLES, false, display.delay + triggerDelay);
|
||||
|
||||
QVector<double> x(GRAPH_SAMPLES), CH1(GRAPH_SAMPLES);
|
||||
analogConvert(readData375_CH1.get(), &CH1, 2048, 0, 1); //No AC coupling!
|
||||
|
|
|
@ -148,6 +148,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
connect(ui->controller_iso, SIGNAL(setGain(double)), ui->controller_iso->driver, SLOT(setGain(double)));
|
||||
connect(ui->controller_fg, &functionGenControl::functionGenToUpdate, ui->controller_iso->driver, &genericUsbDriver::setFunctionGen);
|
||||
connect(ui->bufferDisplay, SIGNAL(modeChange(int)), ui->controller_iso->driver, SLOT(setDeviceMode(int)));
|
||||
connect(ui->bufferDisplay, &bufferControl::modeChange, this, [this](){
|
||||
// Force a trigger refresh
|
||||
ui->controller_iso->setTriggerLevel(ui->triggerLevelValue->value());
|
||||
});
|
||||
connect(ui->bufferDisplay, SIGNAL(updateDig(int)), ui->controller_iso->driver, SLOT(newDig(int)));
|
||||
|
||||
//Set the settings again!
|
||||
|
@ -1359,6 +1363,10 @@ void MainWindow::reinitUsbStage2(void){
|
|||
connect(ui->controller_iso, SIGNAL(setGain(double)), ui->controller_iso->driver, SLOT(setGain(double)));
|
||||
connect(ui->controller_fg, &functionGenControl::functionGenToUpdate, ui->controller_iso->driver, &genericUsbDriver::setFunctionGen);
|
||||
connect(ui->bufferDisplay, SIGNAL(modeChange(int)), ui->controller_iso->driver, SLOT(setDeviceMode(int)));
|
||||
connect(ui->bufferDisplay, &bufferControl::modeChange, this, [this](){
|
||||
// Force a trigger refresh
|
||||
ui->controller_iso->setTriggerLevel(ui->triggerLevelValue->value());
|
||||
});
|
||||
connect(ui->bufferDisplay, SIGNAL(updateDig(int)), ui->controller_iso->driver, SLOT(newDig(int)));
|
||||
|
||||
//Set the settings again!
|
||||
|
|
Loading…
Reference in New Issue