Skip to content

Commit

Permalink
add comments and new api
Browse files Browse the repository at this point in the history
  • Loading branch information
sistemicorp committed Jan 29, 2024
1 parent 59b7260 commit 99d822d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
6 changes: 3 additions & 3 deletions public/VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prev_commit=00ee921c598335812e0145fd19e5f8887ffecf8f
date=2023-12-27 18:12:18 -0500
prev_commit=59b7260a0f17366f5052c26ce44b151da482ca11
date=2023-12-27 18:12:49 -0500
branch=master
version=0.7-1-g00ee921
version=0.7-2-g59b7260
24 changes: 23 additions & 1 deletion public/prism/drivers/fake/Fake.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,38 @@ def adc_read(self):
#

def jig_closed_detect(self):
""" Always report jig is closed as this is a Fake driver.
""" Called by Prism to see if the jig has been "closed" (started)
- Needs to be enabled by hwdrv_fake.py:discover_channels:line ~95
- Always report jig is closed as this is a Fake driver.
:return: <True|False>
"""
self.logger.info("False")
return False

def show_pass_fail(self, p=False, f=False, o=False):
""" Called by Prism with test status
- can be used by this hardware to display test status, on LEDs for example.
:param p: pass
:param f: fail
:param o: other (test in progress)
"""
self.logger.info("pass: {}, Fail: {}, Other: {}".format(p, f, o))

def show_msg(self, msg: str):
""" Called by Prism with test details in progress
- can be used by hardware to display test status
- examples
show_msg 117 - INFO : 0, TST0xxSETUP, UNKNOWN, STATE_RUNNING, 6%, 1, 15
show_msg 117 - INFO : 0, TST0xxSETUP, PASS, STATE_RUNNING, 6%, 1, 15
show_msg 117 - INFO : 0, TST0xxSETUP, PASS, STATE_RUNNING, 6%, 1, 15
show_msg 117 - INFO : 0, TST000_Meas, PASS, STATE_RUNNING, 13%, 2, 15
show_msg 117 - INFO : 0, TST000_Meas, PASS, STATE_RUNNING, 13%, 2, 15
:param msg: csv: channel/slot #, Test ID, Pass/Fail, State, %done, item#, total items
"""
self.logger.info(msg)

#
# Prism Player functions
Expand Down
1 change: 1 addition & 0 deletions public/prism/drivers/fake/hwdrv_fake.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def discover_channels(self):
"version": _driver.version(),
"play": None, # _driver.jig_closed_detect,
"show_pass_fail": _driver.show_pass_fail,
"show_msg": _driver.show_msg,

"close": _driver.close} # good practice to have in place

Expand Down

0 comments on commit 99d822d

Please sign in to comment.