Skip to content

Commit e83fa10

Browse files
committedNov 5, 2019
support AC modification for Hantek6022
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
1 parent 4a3a288 commit e83fa10

10 files changed

+799
-905
lines changed
 

‎CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ else()
2727
add_compile_options(-Wall -Wextra -pedantic)
2828
endif()
2929

30+
# enable extra feature(s)
31+
if ( DEFINED HANTEK_AC )
32+
add_compile_definitions( HANTEK_AC )
33+
endif()
34+
35+
# show all compile definitions
36+
#get_directory_property( DirDefs COMPILE_DEFINITIONS )
37+
#message( "COMPILE_DEFINITIONS = ${DirDefs}" )
38+
3039
# Qt Widgets based Gui with OpenGL canvas
3140
add_subdirectory(openhantek)
3241

‎docs/HANTEK6022_AC_Modification.pdf

1.45 MB
Binary file not shown.

‎openhantek/src/OH_BUILD.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Do not edit, will be re-created at each commit!
2-
#define OH_BUILD "20191103 build 536"
2+
#define OH_BUILD "20191105 build 537"

‎openhantek/src/OH_VERSION.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// define the version that is shown on top of the program
22
// if undefined (for development commits) the build will be shown by OpenHantek
33

4-
//#define OH_VERSION "v2.17-rc6"
4+
#define OH_VERSION "v2.17-rc6"
55

66

77
# ifdef OH_VERSION

‎openhantek/src/hantekdso/models/modelDSO6022.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ static void initSpecifications(Dso::ControlSpecification& specification) {
102102
};
103103

104104
specification.sampleSize = specification.fixedSampleRates.size();
105-
//specification.couplings = {Dso::Coupling::DC};
106-
specification.couplings = {Dso::Coupling::DC, Dso::Coupling::AC}; // requires AC/DC HW mod like DDS120
105+
#ifdef HANTEK_AC
106+
// requires AC/DC HW mod like DDS120, enable with "cmake -D HANTEK_AC=1 .."
107+
specification.couplings = {Dso::Coupling::DC, Dso::Coupling::AC};
108+
#else
109+
specification.couplings = {Dso::Coupling::DC};
110+
#endif
107111
specification.triggerModes = {Dso::TriggerMode::AUTO, Dso::TriggerMode::NORMAL, Dso::TriggerMode::SINGLE};
108112
specification.fixedUSBinLength = 0;
109113
}

0 commit comments

Comments
 (0)