Iterative improvement of fake Lakeshores

This commit is contained in:
Douglas Clowes
2013-06-25 10:15:41 +10:00
parent e26a1fc972
commit 0c179166de
7 changed files with 261 additions and 143 deletions

View File

@@ -62,15 +62,29 @@ def device_display():
return
try:
stdscr.addstr(0, 25, "Identity : %s (%d)" % (myDev.IDN, myPort))
stdscr.addstr(1, 25, "Temperature: %8.3f" % myDev.KRDG[1])
stdscr.addstr(2, 25, "Setpoint : %8.3f" % myDev.SETP[1])
stdscr.addstr(3, 25, "Difference : %8.3f" % (myDev.KRDG[1] - myDev.SETP[1]))
stdscr.addstr(5, 25, "Target : %8.3f" % myDev.TARGET[1])
stdscr.addstr(6, 25, "Ramp Rate : %8.3f" % myDev.RAMP_RATE[1])
stdscr.addstr(7, 25, "Ramp On : %8s" % ["No", "Yes"][myDev.RAMP_ON[1]])
stdscr.addstr(8, 25, "Ramping : %8s" % ["No", "Yes"][myDev.RAMP_ST[1]])
stdscr.addstr(0, 0, "Random : %8.3f" % myDev.RANDOM)
stdscr.addstr(0, 0, "Random :%8.3f" % myDev.RANDOM)
stdscr.addstr(0, 25, "Identity : %s (%d)" % (myDev.IDN, myPort))
stdscr.addstr(1, 0, "Sensor :")
for idx in myDev.CONFIG_SNSRS:
if idx > 4:
continue
stdscr.addstr(1, 12 + (idx - 1) * 12, "%8.3f" % myDev.KRDG[idx])
stdscr.addstr(2, 0, "PV :")
stdscr.addstr(3, 0, "Setpoint :")
stdscr.addstr(4, 0, "Diff :")
for idx in myDev.CONFIG_LOOPS:
stdscr.addstr(2, 12 + (idx - 1) * 12, "%8.3f" % myDev.KRDG[myDev.LOOPINPUT[idx]])
stdscr.addstr(3, 12 + (idx - 1) * 12, "%8.3f" % myDev.SETP[idx])
stdscr.addstr(4, 12 + (idx - 1) * 12, "%8.3f" % (myDev.KRDG[myDev.LOOPINPUT[idx]] - myDev.SETP[idx]))
stdscr.addstr(5, 0, "Target :")
stdscr.addstr(6, 0, "Ramp Rate:")
stdscr.addstr(7, 0, "Ramp On :")
stdscr.addstr(8, 0, "Ramping :")
for idx in myDev.CONFIG_RAMPS:
stdscr.addstr(5, 12 + (idx - 1) * 12, "%8.3f" % myDev.TARGET[idx])
stdscr.addstr(6, 12 + (idx - 1) * 12, "%8.3f" % myDev.RAMP_RATE[idx])
stdscr.addstr(7, 12 + (idx - 1) * 12, "%8s" % ["No", "Yes"][myDev.RAMP_ON[idx]])
stdscr.addstr(8, 12 + (idx - 1) * 12, "%8s" % ["No", "Yes"][myDev.RAMP_ST[idx]])
stdscr.refresh()
except:
raise