diff --git a/.gitignore b/.gitignore index a4a3a0a..ed6114e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ CMakeLists.txt.user build firmware/hex +.cache *.json *.kate-swp .directory diff --git a/CHANGELOG b/CHANGELOG index 90c1eb2..6b2eb99 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -2025-03-09 (e745ffa): try to fix #406, no UI translation now for LANG=en_* (not only en_US) +2025-03-09 (f82859f): try to fix #406, no UI translation now for LANG=en_* (not only en_US) 2025-03-08 (17d05f8): add persistent option "doNotTranslate" to bypass the localisation 2025-03-04 (7b8942a): Show oversampling factor on top of screen 2025-03-03 (3f42320): finetuning the build process - no OH6022 changes diff --git a/openhantek/src/docks/VoltageDock.cpp b/openhantek/src/docks/VoltageDock.cpp index 7dce786..ce677b3 100644 --- a/openhantek/src/docks/VoltageDock.cpp +++ b/openhantek/src/docks/VoltageDock.cpp @@ -9,9 +9,6 @@ #include "VoltageDock.h" #include "dockwindows.h" - -#include "dsosettings.h" -#include "sispinbox.h" #include "utils/printutils.h" diff --git a/openhantek/src/exporting/exporterdata.h b/openhantek/src/exporting/exporterdata.h index 793a2c4..45078aa 100644 --- a/openhantek/src/exporting/exporterdata.h +++ b/openhantek/src/exporting/exporterdata.h @@ -2,7 +2,6 @@ #pragma once -#include "exporterregistry.h" #include "post/ppresult.h" #include "scopesettings.h" diff --git a/openhantek/src/hantekdso/capturing.cpp b/openhantek/src/hantekdso/capturing.cpp index 50a38ba..e21da93 100644 --- a/openhantek/src/hantekdso/capturing.cpp +++ b/openhantek/src/hantekdso/capturing.cpp @@ -74,15 +74,15 @@ void CapturingThread::capture() { while ( controlCommand ) { if ( controlCommand->pending ) { switch ( int( controlCommand->code ) ) { - case uint8_t( ControlCode::CONTROL_SETGAIN_CH1 ): + case uint8_t( Hantek::ControlCode::CONTROL_SETGAIN_CH1 ): gainValue[ 0 ] = controlCommand->data()[ 0 ]; gainIndex[ 0 ] = controlCommand->data()[ 1 ]; break; - case uint8_t( ControlCode::CONTROL_SETGAIN_CH2 ): + case uint8_t( Hantek::ControlCode::CONTROL_SETGAIN_CH2 ): gainValue[ 1 ] = controlCommand->data()[ 0 ]; gainIndex[ 1 ] = controlCommand->data()[ 1 ]; break; - case uint8_t( ControlCode::CONTROL_SETNUMCHANNELS ): + case uint8_t( Hantek::ControlCode::CONTROL_SETNUMCHANNELS ): if ( realSlow ) { // force 2 channels for slow samplings where roll mode is possible if ( *controlCommand->data() == channels ) controlCommand->pending = false; @@ -91,7 +91,7 @@ void CapturingThread::capture() { } channels = *controlCommand->data(); break; - case uint8_t( ControlCode::CONTROL_SETSAMPLERATE ): + case uint8_t( Hantek::ControlCode::CONTROL_SETSAMPLERATE ): samplerate = id2sr( controlCommand->data()[ 0 ] ); uint8_t sampleIndex = controlCommand->data()[ 1 ]; oversampling = uint8_t( hdc->specification->fixedSampleRates[ sampleIndex ].oversampling ); @@ -109,16 +109,16 @@ void CapturingThread::capture() { realSlow = effectiveSamplerate < 10e3; if ( realSlow ) { // roll mode possible? if ( channels != 2 ) // always switch to two channels - hdc->modifyCommand< ControlSetNumChannels >( ControlCode::CONTROL_SETNUMCHANNELS )->setNumChannels( 2 ); + hdc->modifyCommand< Hantek::ControlSetNumChannels >( Hantek::ControlCode::CONTROL_SETNUMCHANNELS )->setNumChannels( 2 ); } else { if ( channels == 2 && hdc->isSingleChannel() ) // switch back to real user setting - hdc->modifyCommand< ControlSetNumChannels >( ControlCode::CONTROL_SETNUMCHANNELS )->setNumChannels( 1 ); + hdc->modifyCommand< Hantek::ControlSetNumChannels >( Hantek::ControlCode::CONTROL_SETNUMCHANNELS )->setNumChannels( 1 ); } break; } QString name = ""; if ( controlCommand->code >= 0xe0 && controlCommand->code <= 0xe6 ) - name = controlNames[ controlCommand->code - 0xe0 ]; + name = Hantek::controlNames[ controlCommand->code - 0xe0 ]; timestampDebug( QString( "Sending control command 0x%1 (%2): %3" ) .arg( QString::number( controlCommand->code, 16 ), name, hexdecDump( controlCommand->data(), unsigned( controlCommand->size() ) ) ) ); @@ -174,7 +174,7 @@ void CapturingThread::capture() { unsigned CapturingThread::getRealSamples() { int errorCode; - errorCode = hdc->scopeDevice->controlWrite( hdc->getCommand( ControlCode::CONTROL_STARTSAMPLING ) ); + errorCode = hdc->scopeDevice->controlWrite( hdc->getCommand( Hantek::ControlCode::CONTROL_STARTSAMPLING ) ); if ( errorCode < 0 ) { qWarning() << "controlWrite: Getting sample data failed: " << libUsbErrorString( errorCode ); dp->clear(); diff --git a/openhantek/src/hantekdso/hantekdsocontrol.cpp b/openhantek/src/hantekdso/hantekdsocontrol.cpp index d3fe1a4..22cc8fe 100644 --- a/openhantek/src/hantekdso/hantekdsocontrol.cpp +++ b/openhantek/src/hantekdso/hantekdsocontrol.cpp @@ -8,7 +8,6 @@ #include #include "hantekdsocontrol.h" -#include "hantekprotocol/controlStructs.h" #include "mathchannel.h" #include "scopesettings.h" #include "usb/scopedevice.h" diff --git a/openhantek/src/hantekdso/hantekdsocontrol.h b/openhantek/src/hantekdso/hantekdsocontrol.h index 7caad56..f3e2a38 100644 --- a/openhantek/src/hantekdso/hantekdsocontrol.h +++ b/openhantek/src/hantekdso/hantekdsocontrol.h @@ -17,10 +17,8 @@ #include "mathchannel.h" #include "scopesettings.h" #include "triggering.h" -#include "utils/printutils.h" -#include "viewconstants.h" -#include "hantekprotocol/controlStructs.h" +#include "hantekprotocol/controlcode.h" #include "hantekprotocol/definitions.h" #include "dsomodel.h" diff --git a/openhantek/src/hantekdso/mathchannel.cpp b/openhantek/src/hantekdso/mathchannel.cpp index 9d36187..6091fd2 100644 --- a/openhantek/src/hantekdso/mathchannel.cpp +++ b/openhantek/src/hantekdso/mathchannel.cpp @@ -3,7 +3,6 @@ #include #include -#include "hantekdsocontrol.h" #include "mathchannel.h" #include "mathmodes.h" #include diff --git a/openhantek/src/hantekdso/triggering.h b/openhantek/src/hantekdso/triggering.h index 7405096..fabf9d7 100644 --- a/openhantek/src/hantekdso/triggering.h +++ b/openhantek/src/hantekdso/triggering.h @@ -4,7 +4,6 @@ #include "controlsettings.h" #include "dsosamples.h" -#include "errorcodes.h" #include "scopesettings.h" class Triggering { diff --git a/openhantek/src/hantekprotocol/controlStructs.cpp b/openhantek/src/hantekprotocol/controlStructs.cpp index ea6f4b3..4ddf4a6 100644 --- a/openhantek/src/hantekprotocol/controlStructs.cpp +++ b/openhantek/src/hantekprotocol/controlStructs.cpp @@ -4,6 +4,7 @@ #include "controlStructs.h" #include "definitions.h" +#include "controlcode.h" namespace Hantek { diff --git a/openhantek/src/hantekprotocol/controlStructs.h b/openhantek/src/hantekprotocol/controlStructs.h index d1fec9b..d8f9a7d 100644 --- a/openhantek/src/hantekprotocol/controlStructs.h +++ b/openhantek/src/hantekprotocol/controlStructs.h @@ -2,10 +2,8 @@ #pragma once -#include "controlcode.h" #include "controlcommand.h" #include "types.h" -#include "usb/usbdevicedefinitions.h" #include #include diff --git a/openhantek/src/main.cpp b/openhantek/src/main.cpp index 14154a8..5097b7c 100644 --- a/openhantek/src/main.cpp +++ b/openhantek/src/main.cpp @@ -28,7 +28,6 @@ // Settings #include "dsosettings.h" -#include "viewconstants.h" #include "viewsettings.h" // DSO core logic @@ -39,7 +38,6 @@ // Post processing #include "post/graphgenerator.h" -// #include "post/mathchannelgenerator.h" #include "post/postprocessing.h" #include "post/spectrumgenerator.h" @@ -56,8 +54,6 @@ // OpenGL setup #include "glscope.h" -#include "models/modelDEMO.h" - #include "OH_VERSION.h" using namespace Hantek; diff --git a/openhantek/src/usb/finddevices.cpp b/openhantek/src/usb/finddevices.cpp index ab0cb37..d607447 100644 --- a/openhantek/src/usb/finddevices.cpp +++ b/openhantek/src/usb/finddevices.cpp @@ -6,18 +6,16 @@ #include #include #include - -#include "ezusb.h" -#include "utils/printutils.h" #include +#include "models/modelDEMO.h" +#include "modelregistry.h" + #ifdef Q_OS_FREEBSD #include #else #include #endif -#include "modelregistry.h" - FindDevices::FindDevices( libusb_context *context, int verboseLevel ) : context( context ), verboseLevel( verboseLevel ) { if ( verboseLevel > 1 ) diff --git a/openhantek/src/usb/scopedevice.cpp b/openhantek/src/usb/scopedevice.cpp index 52e7cf4..74d38d0 100644 --- a/openhantek/src/usb/scopedevice.cpp +++ b/openhantek/src/usb/scopedevice.cpp @@ -9,6 +9,8 @@ #include "hantekdso/dsomodel.h" #include "hantekprotocol/controlStructs.h" +#include "hantekprotocol/controlcode.h" +#include "models/modelDEMO.h" #include diff --git a/openhantek/src/usb/scopedevice.h b/openhantek/src/usb/scopedevice.h index f2103f0..532b0b3 100644 --- a/openhantek/src/usb/scopedevice.h +++ b/openhantek/src/usb/scopedevice.h @@ -14,7 +14,7 @@ #endif #include -#include "models/modelDEMO.h" +#include "dsomodel.h" #include "usbdevicedefinitions.h" class DSOModel; diff --git a/openhantek/translations/openhantek_de.ts b/openhantek/translations/openhantek_de.ts index 4660567..7d4974a 100644 --- a/openhantek/translations/openhantek_de.ts +++ b/openhantek/translations/openhantek_de.ts @@ -2720,37 +2720,37 @@ VoltageDock - + Voltage Spannung - + CH&%1 CH&%1 - + MA&TH MA&TH - + Voltage range per vertical screen division Spannung pro vertikaler Teilung - + x x - + Select DC or AC coupling Wähle AC- oder DC-Kopplung - + Select the mathematical operation for this channel Berechnungen für diesen Kanal @@ -2759,12 +2759,12 @@ &MATH - + Invert Invertiert - + Set probe attenuation, scroll or type a value to select Wähle Tastkopf-Abschwächung, Mausrad oder direkte Eingabe möglich @@ -2772,88 +2772,88 @@ main - - + + Show the international interface, do not translate Internationale Version ohne Übersetzung - + Load config file Lade Konfigurationsdatei - + File Datei - + Demo mode without scope HW Demo-Modus ohne Hardware - + Use OpenGL ES instead of OpenGL Benutze OpenGL ES anstelle von OpenGL - + Do not connect automatically Nicht automatisch verbinden - + Force OpenGL SL version 1.20 Erzwinge OpenGL SL Version 1.20 - + Force OpenGL SL version 1.50 Erzwinge OpenGL SL Version 1.50 - + Define the system font Definiere die System-Schriftart - + Font Schriftart - + Set the font size (default = %1, 0: automatic from dpi) Wähle Schriftgröße (Standard = %1, 0: automatisch von Bildschirmauflösung) - + Size Größe - + Set the font condensed value (default = %1) Wähle schmalere Schrift (Standard : %1) - + Condensed Schmaler - + Reset persistent settings, start with default Zurücksetzen auf Standardwerte - + Verbose tracing of program startup, ui and processing steps Zeige Hinweise während des Programmstarts und der Verarbeitungsschritte - + Level Stufe diff --git a/openhantek/translations/openhantek_es.ts b/openhantek/translations/openhantek_es.ts index 5bdd1fd..e55a385 100644 --- a/openhantek/translations/openhantek_es.ts +++ b/openhantek/translations/openhantek_es.ts @@ -2371,47 +2371,47 @@ VoltageDock - + Voltage Tensión - + CH&%1 CH&%1 - + MA&TH MA&TH - + Voltage range per vertical screen division Rango de tensión por división de pantalla vertical - + Select DC or AC coupling Seleccionar acoplamiento DC o AC - + Select the mathematical operation for this channel Seleccione la operación matemática para este canal - + Invert Invertir - + Set probe attenuation, scroll or type a value to select Configure la atenuación de la sonda, desplácese o escriba un valor para seleccionar - + x x @@ -2419,88 +2419,88 @@ main - - + + Show the international interface, do not translate Mostrar la interfaz internacional, no traducir - + Load config file Cargar archivo de configuración - + File Archivo - + Demo mode without scope HW Modo de demostración sin osciloscopio HW - + Use OpenGL ES instead of OpenGL Usar OpenGL ES en vez de OpenGL - + Do not connect automatically No conectar automáticamente - + Force OpenGL SL version 1.20 Forzar OpenGL SL versión 1.20 - + Force OpenGL SL version 1.50 Forzar OpenGL SL versión 1.50 - + Define the system font Definir la fuente del sistema - + Font Fuente - + Set the font size (default = %1, 0: automatic from dpi) Establecer el tamaño de fuente (por defecto = %1, 0: automático de dpi) - + Size Tamaño - + Set the font condensed value (default = %1) Establecer el valor condensado de la fuente (por defecto = %1) - + Condensed Condensado - + Reset persistent settings, start with default Restablecer la configuración persistente, comenzar con la predeterminada - + Verbose tracing of program startup, ui and processing steps Seguimiento detallado del inicio del programa, la interfaz de usuario y los pasos de procesamiento - + Level Nivel diff --git a/openhantek/translations/openhantek_fr.ts b/openhantek/translations/openhantek_fr.ts index f984083..44d9a6f 100644 --- a/openhantek/translations/openhantek_fr.ts +++ b/openhantek/translations/openhantek_fr.ts @@ -2505,42 +2505,42 @@ VoltageDock - + Voltage Tension - + CH&%1 - + MA&TH - + Voltage range per vertical screen division Plage de tension par division verticale de l'écran - + x x - + Select DC or AC coupling Sélectionner le couplage DC ou AC - + Select the mathematical operation for this channel Sélectionnez l'opération mathématique pour ce canal - + Set probe attenuation, scroll or type a value to select Réglez l'atténuation de la sonde, faites défiler ou tapez une valeur pour la sélectionner @@ -2549,7 +2549,7 @@ &MATH - + Invert Inverser @@ -2561,88 +2561,88 @@ main - - + + Show the international interface, do not translate Afficher l'interface internationale, ne pas traduire - + Load config file Charger le fichier de configuration - + File Fichier - + Demo mode without scope HW Mode démo sans équipement - + Use OpenGL ES instead of OpenGL Utilisez OpenGL ES à la place de OpenGL - + Do not connect automatically Ne pas connecter automatiquement - + Force OpenGL SL version 1.20 - + Force OpenGL SL version 1.50 - + Define the system font Définir la fonte du système - + Font Font - + Set the font size (default = %1, 0: automatic from dpi) Définir la taille de la fonte (par défaut = %1, 0 : automatique à partir des dpi) - + Size Taille - + Set the font condensed value (default = %1) - + Condensed Condensé - + Reset persistent settings, start with default Réinitialisation des paramètres persistants, démarrage par défaut - + Verbose tracing of program startup, ui and processing steps Traçage verbeux du démarrage du programme, de l'interface utilisateur et des étapes de traitement - + Level Niveau diff --git a/openhantek/translations/openhantek_it.ts b/openhantek/translations/openhantek_it.ts index 388cb37..f2c8977 100644 --- a/openhantek/translations/openhantek_it.ts +++ b/openhantek/translations/openhantek_it.ts @@ -1960,47 +1960,47 @@ VoltageDock - + Voltage Tensione - + CH&%1 - + MA&TH - + Voltage range per vertical screen division Tensione per divisione verticale dello schermo - + x x - + Select DC or AC coupling Selezionare l'accoppiamento DC o AC - + Select the mathematical operation for this channel Selezionare l'operazione matematica per questo canale - + Invert Invertire - + Set probe attenuation, scroll or type a value to select Impostare l'attenuazione della sonda, scorrere o digitare un valore da selezionare @@ -2008,88 +2008,88 @@ main - - + + Show the international interface, do not translate - + Load config file - + File - + Demo mode without scope HW - + Use OpenGL ES instead of OpenGL - + Do not connect automatically - + Force OpenGL SL version 1.20 - + Force OpenGL SL version 1.50 - + Define the system font - + Font - + Set the font size (default = %1, 0: automatic from dpi) - + Size - + Set the font condensed value (default = %1) - + Condensed - + Reset persistent settings, start with default - + Verbose tracing of program startup, ui and processing steps - + Level diff --git a/openhantek/translations/openhantek_pl.ts b/openhantek/translations/openhantek_pl.ts index fb83847..d49c7f9 100644 --- a/openhantek/translations/openhantek_pl.ts +++ b/openhantek/translations/openhantek_pl.ts @@ -2599,37 +2599,37 @@ VoltageDock - + Voltage Napięcie - + CH&%1 CH&%1 - + MA&TH MA&TH - + Voltage range per vertical screen division - + x x - + Select DC or AC coupling - + Select the mathematical operation for this channel @@ -2638,12 +2638,12 @@ &MATH - + Invert Odwróć - + Set probe attenuation, scroll or type a value to select @@ -2651,88 +2651,88 @@ main - - + + Show the international interface, do not translate - + Load config file - + File Plik - + Demo mode without scope HW Tryb demo bez hardware'u - + Use OpenGL ES instead of OpenGL Użyj OpenGL ES zamiast OpenGL - + Do not connect automatically - + Force OpenGL SL version 1.20 - + Force OpenGL SL version 1.50 - + Define the system font - + Font - + Set the font size (default = %1, 0: automatic from dpi) - + Size - + Set the font condensed value (default = %1) - + Condensed - + Reset persistent settings, start with default - + Verbose tracing of program startup, ui and processing steps - + Level diff --git a/openhantek/translations/openhantek_pt.ts b/openhantek/translations/openhantek_pt.ts index 6606f8a..1123d50 100644 --- a/openhantek/translations/openhantek_pt.ts +++ b/openhantek/translations/openhantek_pt.ts @@ -2434,47 +2434,47 @@ VoltageDock - + Voltage Tensão - + CH&%1 - + MA&TH - + Voltage range per vertical screen division - + x x - + Select DC or AC coupling - + Select the mathematical operation for this channel - + Invert - + Set probe attenuation, scroll or type a value to select @@ -2482,88 +2482,88 @@ main - - + + Show the international interface, do not translate - + Load config file - + File Arquivo - + Demo mode without scope HW - + Use OpenGL ES instead of OpenGL Usar OpenGL ES em vez de OpenGL - + Do not connect automatically - + Force OpenGL SL version 1.20 - + Force OpenGL SL version 1.50 - + Define the system font - + Font - + Set the font size (default = %1, 0: automatic from dpi) - + Size - + Set the font condensed value (default = %1) - + Condensed - + Reset persistent settings, start with default - + Verbose tracing of program startup, ui and processing steps - + Level diff --git a/openhantek/translations/openhantek_ru.ts b/openhantek/translations/openhantek_ru.ts index 92590bf..fd58661 100644 --- a/openhantek/translations/openhantek_ru.ts +++ b/openhantek/translations/openhantek_ru.ts @@ -2363,32 +2363,32 @@ VoltageDock - + Voltage Напряжение - + CH&%1 Канал &%1 - + MA&TH Ма&тем. - + Voltage range per vertical screen division Диапазон напряжения на вертикальное деление экрана - + Select DC or AC coupling Выбор цепи под постоянный (DC) или переменный (AC) ток - + Select the mathematical operation for this channel Выбор математической операции для этого канала @@ -2397,17 +2397,17 @@ &MATH - + Invert Инверсия - + Set probe attenuation, scroll or type a value to select Настройка делителя щупа, для выбора прокрутите или введите значение - + x x @@ -2415,88 +2415,88 @@ main - - + + Show the international interface, do not translate Показывать международный интерфейс, не переводить - + Load config file Загрузить файла конфигурации - + File Файл - + Demo mode without scope HW Демо режим без аппаратуры осциллографа - + Use OpenGL ES instead of OpenGL Использовать OpenGL ES вместо OpenGL - + Do not connect automatically Не подключайтесь автоматически - + Force OpenGL SL version 1.20 Принудительное использование OpenGL SL version 1.20 - + Force OpenGL SL version 1.50 Принудительное использование OpenGL SL version 1.50 - + Define the system font Определить системный шрифт - + Font Шрифт - + Set the font size (default = %1, 0: automatic from dpi) Задать размер шрифта (по умолчанию = %1, 0: автоматически от dpi) - + Size Размер - + Set the font condensed value (default = %1) Задать значение сжатия шрифта (по умолчанию = %1) - + Condensed Сжатый - + Reset persistent settings, start with default Сбросить постоянные настройки, начать со значений по умолчанию - + Verbose tracing of program startup, ui and processing steps Подробная трассировка запуска программы, пользовательского интерфейса и этапов обработки - + Level Уровень diff --git a/openhantek/translations/openhantek_sv.ts b/openhantek/translations/openhantek_sv.ts index f378b1e..f1e87cc 100644 --- a/openhantek/translations/openhantek_sv.ts +++ b/openhantek/translations/openhantek_sv.ts @@ -2052,47 +2052,47 @@ VoltageDock - + Voltage Volt - + CH&%1 KAN&%1 - + MA&TH MA&TTE - + Voltage range per vertical screen division Spänningsområde per vertikal skärmdivision - + Select DC or AC coupling Välj DC- eller AC-koppling - + Select the mathematical operation for this channel Välj matematisk operation för denna kanal - + Invert Invertera - + Set probe attenuation, scroll or type a value to select Ställ in sonddämpning, bläddra eller skriv in ett värde för att välja - + x x @@ -2100,88 +2100,88 @@ main - - + + Show the international interface, do not translate - + Load config file - + File - + Demo mode without scope HW - + Use OpenGL ES instead of OpenGL - + Do not connect automatically - + Force OpenGL SL version 1.20 - + Force OpenGL SL version 1.50 - + Define the system font - + Font - + Set the font size (default = %1, 0: automatic from dpi) - + Size - + Set the font condensed value (default = %1) - + Condensed - + Reset persistent settings, start with default - + Verbose tracing of program startup, ui and processing steps - + Level diff --git a/openhantek/translations/openhantek_zh.ts b/openhantek/translations/openhantek_zh.ts index 1619b16..12b8b91 100644 --- a/openhantek/translations/openhantek_zh.ts +++ b/openhantek/translations/openhantek_zh.ts @@ -2507,47 +2507,47 @@ VoltageDock - + Voltage 电压 - + CH&%1 CH&%1 - + MA&TH MA&TH - + Voltage range per vertical screen division - + Select DC or AC coupling - + Select the mathematical operation for this channel - + Invert 反转 - + Set probe attenuation, scroll or type a value to select - + x x @@ -2555,88 +2555,88 @@ main - - + + Show the international interface, do not translate - + Load config file - + File 文件 - + Demo mode without scope HW - + Use OpenGL ES instead of OpenGL 使用OpenGL ES代替OpenGL - + Do not connect automatically - + Force OpenGL SL version 1.20 - + Force OpenGL SL version 1.50 - + Define the system font - + Font - + Set the font size (default = %1, 0: automatic from dpi) - + Size - + Set the font condensed value (default = %1) - + Condensed - + Reset persistent settings, start with default - + Verbose tracing of program startup, ui and processing steps - + Level