Skip to content

Commit

Permalink
Fixed some bugs:
Browse files Browse the repository at this point in the history
* The "Digital Measurements" box was not repainted correctly
* It was possible to cause an inconsistency between the target
  configuration and the UI's configuration in certain circumstances.
* One signal was "called" instead of being "emitted"
  • Loading branch information
lindvalla committed Apr 16, 2014
1 parent 2d4f95d commit 87fc515
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions app/capture/uidigitalgroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ void UiDigitalGroup::setCycleData(double start, double mid, double end,
}

doLayout();
repaint();
}

/*!
Expand Down
28 changes: 16 additions & 12 deletions app/device/labtool/labtoolcapturedevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,6 @@ void LabToolCaptureDevice::convertDigitalInput(const quint8 *pData, quint32 size

}


if (mDigitalSignals[id] != NULL) {
delete mDigitalSignals[id];
}
Expand Down Expand Up @@ -1130,10 +1129,10 @@ void LabToolCaptureDevice::start(int sampleRate)

LabToolCalibrationData* mCalib = mDeviceComm->storedCalibrationData();
if (mCalib == NULL || mCalib->isDefaultData()) {
captureFinished(false, "The connected LabTool Device hardware has not been calibrated "
"and is running with default parameters. "
"Run the Calibration Wizard to correct it.\n"
"This capture has been aborted!");
emit captureFinished(false, "The connected LabTool Device hardware has not been calibrated "
"and is running with default parameters. "
"Run the Calibration Wizard to correct it.\n"
"This capture has been aborted!");
return;
}
}
Expand All @@ -1150,6 +1149,7 @@ void LabToolCaptureDevice::start(int sampleRate)
mRunningCapture = true;
if (hasConfigChanged()) {
qDebug("Configuration has changed and will be pushed to target");
saveConfig();
mDeviceComm->configureCapture(configSize(), configData());
} else {
//qDebug("Configuration same as last time");
Expand Down Expand Up @@ -1367,13 +1367,17 @@ void LabToolCaptureDevice::handleStopped()
*/
void LabToolCaptureDevice::handleConfigurationDone()
{
// now that the configuration has been applied, save current configuration
saveConfig();

// configuration only done immediately before running, so run now
//qDebug("Configuration done, time to run");
mDeviceComm->runCapture();
mRunningCapture = true;
if (hasConfigChanged()) {
// configuration changed while configuring, do a reconfiguration
//qDebug("Configuration changed while configuring. Doing it again");
saveConfig();
mDeviceComm->configureCapture(configSize(), configData());
} else {
// configuration only done immediately before running, so run now
//qDebug("Configuration done, time to run");
mDeviceComm->runCapture();
mRunningCapture = true;
}
}

/*!
Expand Down

0 comments on commit 87fc515

Please sign in to comment.