Skip to content

Commit 09facde

Browse files
committed
sort examples for linux (libusb) and win (sdk)
Signed-off-by: Martin <[email protected]>
1 parent 2baff2d commit 09facde

29 files changed

+40
-21
lines changed
File renamed without changes.

examples/example_linux_continous_read.py renamed to examples/examples_libusb/continous_read.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/python3
2+
13
__author__ = 'rcope'
24

35
from PyHT6022.LibUsbScope import Oscilloscope

examples/example_linux_dummy_scopevis.py renamed to examples/examples_libusb/dummy_scopevis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def apply_data_smoothing(data, window=1):
3737

3838
for i in range( data_points ):
3939
timing_data.append( i )
40-
voltage_data.append( ( i-data_points/2 ) / 100 + math.sin(i) )
40+
voltage_data.append( i/10 + math.sin(i) )
4141

4242

4343
if len(timing_data) != len(voltage_data):
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../PyHT6022/HantekFirmware/custom/build/firmware.ihx
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#!/usr/bin/python3
2-
# Flash the modded firmware that is also used by OpenHantek project
32

43
__author__ = 'Robert Cope'
54

65
from PyHT6022.LibUsbScope import Oscilloscope
7-
from PyHT6022.HantekFirmware import mod_firmware_01
6+
from PyHT6022.HantekFirmware import custom_firmware as Firmware
87

98
scope = Oscilloscope()
109
scope.setup()
1110
scope.open_handle()
12-
13-
scope.flash_firmware( mod_firmware_01 )
14-
11+
scope.flash_firmware( firmware = Firmware )
1512
scope.close_handle()
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python3
2-
# flash the default firmware -> PyHT6022.HantekFirmware.custom_firmware
3-
# does not (yet) work wth OpenHantek project
2+
3+
# flash the firmware from hex file
44

55
__author__ = 'Robert Cope'
66

@@ -9,14 +9,10 @@
99

1010
if len( argv ) > 1:
1111
firmware = argv[ 1 ]
12-
1312
scope = Oscilloscope()
1413
scope.setup()
1514
scope.open_handle()
16-
1715
scope.flash_firmware_from_hex( firmware )
18-
1916
scope.close_handle()
20-
2117
else:
22-
print( "usage: " + argv[0] + " hexfile" )
18+
print( "usage: " + argv[0] + " path_to_hexfile" )
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/python3
2+
3+
__author__ = 'Robert Cope'
4+
5+
from PyHT6022.LibUsbScope import Oscilloscope
6+
from PyHT6022.HantekFirmware import mod_firmware_01 as Firmware
7+
8+
scope = Oscilloscope()
9+
scope.setup()
10+
scope.open_handle()
11+
scope.flash_firmware( firmware = Firmware )
12+
scope.close_handle()
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#!/usr/bin/python3
2-
# flash the default firmware -> PyHT6022.HantekFirmware.custom_firmware
3-
# does not (yet) work wth OpenHantek project
42

53
__author__ = 'Robert Cope'
64

75
from PyHT6022.LibUsbScope import Oscilloscope
6+
from PyHT6022.HantekFirmware import mod_firmware_iso as Firmware
87

98
scope = Oscilloscope()
109
scope.setup()
1110
scope.open_handle()
12-
13-
scope.flash_firmware()
14-
11+
scope.flash_firmware( firmware = Firmware )
1512
scope.close_handle()

0 commit comments

Comments
 (0)