Skip to content

Commit

Permalink
DDS120 EEPROM contains no calibration data but factory fimware
Browse files Browse the repository at this point in the history
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
  • Loading branch information
Ho-Ro committed Apr 6, 2020
1 parent 0e8583f commit b2c5492
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 26 deletions.
2 changes: 1 addition & 1 deletion openhantek/src/OH_BUILD.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Do not edit, will be re-created at each commit!
#define OH_BUILD "20200405 build 635"
#define OH_BUILD "20200406 build 636"
3 changes: 2 additions & 1 deletion openhantek/src/hantekdso/controlspecification.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ struct ControlSpecification {
std::vector<FixedSampleRate> fixedSampleRates;

// Calibration

/// DSO6022 has calibration in small EEPROM, DDS120 has big fw EEPROM
bool hasCalibrationStorage = true;
/// The sample values at the top of the screen
typedef std::vector<int> VoltageScale;
std::vector<VoltageScale> voltageScale; // Per channel
Expand Down
10 changes: 7 additions & 3 deletions openhantek/src/hantekdso/hantekdsocontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,15 @@ unsigned HantekDsoControl::getRecordLength() const {
Dso::ErrorCode HantekDsoControl::retrieveChannelLevelData() {
// Get calibration data from EEPROM
//printf( "retrieveChannelLevelData()\n" );
int errorCode = device->controlRead(&controlsettings.cmdGetLimits);
int errorCode = -1;
if ( specification->hasCalibrationStorage )
errorCode = device->controlRead(&controlsettings.cmdGetLimits);
if ( errorCode < 0) {
// invalidate the calibration values.
memset(controlsettings.calibrationValues, 0xFF, sizeof( CalibrationValues ) );
qWarning() << tr("Couldn't get calibration data from oscilloscope");
emit statusMessage(tr("Couldn't get calibration data from oscilloscope"), 0);
QString message = tr("Couldn't get calibration data from oscilloscope's EEPROM. Use a config file for calibration!");
qWarning() << message;
emit statusMessage( message , 0);
emit communicationError();
return Dso::ErrorCode::CONNECTION;
}
Expand Down
1 change: 1 addition & 0 deletions openhantek/src/hantekdso/models/modelDDS120.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ static void initSpecifications(Dso::ControlSpecification& specification) {
specification.fixedUSBinLength = 0;
// calibration frequency (requires >FW0206)
specification.calfreqSteps = { 50, 60, 100, 200, 500, 1e3, 2e3, 5e3, 10e3, 20e3, 50e3, 100e3 };
specification.hasCalibrationStorage = false;
}

static void applyRequirements_(HantekDsoControl *dsoControl) {
Expand Down
1 change: 1 addition & 0 deletions openhantek/src/hantekdso/models/modelDSO6022.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ static void initSpecifications(Dso::ControlSpecification& specification) {

// calibration frequency (requires >FW0206)
specification.calfreqSteps = { 50, 60, 100, 200, 500, 1e3, 2e3, 5e3, 10e3, 20e3, 50e3, 100e3 };
specification.hasCalibrationStorage = true;
}

static void applyRequirements_(HantekDsoControl *dsoControl) {
Expand Down
9 changes: 6 additions & 3 deletions openhantek/translations/openhantek_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,15 +428,18 @@
<context>
<name>HantekDsoControl</name>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="382"/>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="383"/>
<source>Couldn&apos;t get calibration data from oscilloscope</source>
<translation>Konnte Kalibrierdaten des Oszilloskops nicht lesen</translation>
<translation type="vanished">Konnte Kalibrierdaten des Oszilloskops nicht lesen</translation>
</message>
<message>
<source>Couldn&apos;t get channel level data from oscilloscope</source>
<translation type="vanished">Konnte Kanalpegeldaten des Oszilloskops nicht lesen</translation>
</message>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="385"/>
<source>Couldn&apos;t get calibration data from oscilloscope&apos;s EEPROM. Use a config file for calibration!</source>
<translation>Konnte Kalibrierdaten des Oszilloskops nicht lesen, benutze eine config-Datei für die Kalibrierung!</translation>
</message>
</context>
<context>
<name>HorizontalDock</name>
Expand Down
9 changes: 6 additions & 3 deletions openhantek/translations/openhantek_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,13 @@
<context>
<name>HantekDsoControl</name>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="382"/>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="383"/>
<source>Couldn&apos;t get calibration data from oscilloscope</source>
<translation>No se pudieron obtener los datos de calibración del osciloscopio</translation>
<translation type="vanished">No se pudieron obtener los datos de calibración del osciloscopio</translation>
</message>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="385"/>
<source>Couldn&apos;t get calibration data from oscilloscope&apos;s EEPROM. Use a config file for calibration!</source>
<translation>No se pudieron obtener los datos de calibración del osciloscopio. ¡Usa un archivo de configuración para la calibración!</translation>
</message>
</context>
<context>
Expand Down
11 changes: 5 additions & 6 deletions openhantek/translations/openhantek_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,16 +429,15 @@
</context>
<context>
<name>HantekDsoControl</name>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="382"/>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="383"/>
<source>Couldn&apos;t get calibration data from oscilloscope</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Couldn&apos;t get channel level data from oscilloscope</source>
<translation type="vanished">Impossible d&apos;obtenir les données de niveau du canal depuis l&apos;oscilloscope</translation>
</message>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="385"/>
<source>Couldn&apos;t get calibration data from oscilloscope&apos;s EEPROM. Use a config file for calibration!</source>
<translation>Impossible d&apos;obtenir les données de niveau du canal depuis l&apos;oscilloscope. Utilisez un fichier de configuration pour la calibration !</translation>
</message>
</context>
<context>
<name>HorizontalDock</name>
Expand Down
5 changes: 2 additions & 3 deletions openhantek/translations/openhantek_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,8 @@
<context>
<name>HantekDsoControl</name>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="382"/>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="383"/>
<source>Couldn&apos;t get calibration data from oscilloscope</source>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="385"/>
<source>Couldn&apos;t get calibration data from oscilloscope&apos;s EEPROM. Use a config file for calibration!</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
11 changes: 5 additions & 6 deletions openhantek/translations/openhantek_pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,16 +451,15 @@
</context>
<context>
<name>HantekDsoControl</name>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="382"/>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="383"/>
<source>Couldn&apos;t get calibration data from oscilloscope</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Couldn&apos;t get channel level data from oscilloscope</source>
<translation type="vanished">Não foi possível obter dados do canal do osciloscópio</translation>
</message>
<message>
<location filename="../src/hantekdso/hantekdsocontrol.cpp" line="385"/>
<source>Couldn&apos;t get calibration data from oscilloscope&apos;s EEPROM. Use a config file for calibration!</source>
<translation>Não foi possível obter dados de calibração a partir da EEPROM do osciloscópio. Use um arquivo de configuração para a calibração!</translation>
</message>
</context>
<context>
<name>HorizontalDock</name>
Expand Down

0 comments on commit b2c5492

Please sign in to comment.