Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate the download packet function #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion radicl/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def connect(self, device=None):
# Switch the device over to API mode
api.sendApiPortEnable()
self.api = api
self.api.Identify()

ret = self.getProbeMeasState()
connected = True if ret is not None else False
Expand All @@ -93,6 +94,10 @@ def connect(self, device=None):
" power cycle it.")
return connected

def disconnect(self):
self.log.info("Disconnecting probe.")
self.api.port.closePort()

@property
def state(self):
return self._state
Expand Down Expand Up @@ -746,7 +751,7 @@ def getProbeHeader(self):
t.hour, t.minute, t.second)
header = {"RECORDED": time_stamp,
"radicl VERSION": __version__,
"FIRMWARE REVISION": self.api.fw_rev,
"FIRMWARE REVISION": self.api.full_fw_rev,
"HARDWARE REVISION": self.api.hw_rev,
"MODEL NUMBER": self.api.hw_id,
"Serial Num.":self.serial_number,
Expand Down
Loading