Skip to content

Commit

Permalink
Merge pull request #199 from elechapt/bugfix-USB3Error
Browse files Browse the repository at this point in the history
Handling the connection with USB2 wire for ps5000D
  • Loading branch information
hmaarrfk authored Apr 11, 2024
2 parents 1865e78 + 5be00bc commit e71dee8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions picoscope/picobase.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,4 +1183,6 @@ def changePowerSource(self, powerstate):
powerstate = 0x119
elif powerstate == "PICO_POWER_SUPPLY_NOT_CONNECTED":
powerstate = 0x11A
elif powerstate == "PICO_USB3_0_DEVICE_NON_USB3_0_PORT":
powerstate = 0x11E
self._lowLevelChangePowerSource(powerstate)
3 changes: 2 additions & 1 deletion picoscope/ps5000a.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ def _lowLevelOpenUnit(self, serialNumber):
# since the user should address this immediately, and we
# shouldn't let this go as a soft error
# but I think this should do for now
if m == 0x11A:
# PICO_POWER_SUPPLY_NOT_CONNECTED or PICO_USB3_0_DEVICE_NON_USB3_0_PORT
if m == 0x11A or m == 0x11E:
self.changePowerSource(m)
else:
self.checkResult(m)
Expand Down

0 comments on commit e71dee8

Please sign in to comment.