Skip to content

Commit e71dee8

Browse files
authored
Merge pull request #199 from elechapt/bugfix-USB3Error
Handling the connection with USB2 wire for ps5000D
2 parents 1865e78 + 5be00bc commit e71dee8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

picoscope/picobase.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,4 +1183,6 @@ def changePowerSource(self, powerstate):
11831183
powerstate = 0x119
11841184
elif powerstate == "PICO_POWER_SUPPLY_NOT_CONNECTED":
11851185
powerstate = 0x11A
1186+
elif powerstate == "PICO_USB3_0_DEVICE_NON_USB3_0_PORT":
1187+
powerstate = 0x11E
11861188
self._lowLevelChangePowerSource(powerstate)

picoscope/ps5000a.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ def _lowLevelOpenUnit(self, serialNumber):
177177
# since the user should address this immediately, and we
178178
# shouldn't let this go as a soft error
179179
# but I think this should do for now
180-
if m == 0x11A:
180+
# PICO_POWER_SUPPLY_NOT_CONNECTED or PICO_USB3_0_DEVICE_NON_USB3_0_PORT
181+
if m == 0x11A or m == 0x11E:
181182
self.changePowerSource(m)
182183
else:
183184
self.checkResult(m)

0 commit comments

Comments
 (0)