Commits

Ada Young committed c5db8a7

Fixed vlist and empty vial handling, empty vials no longer appear in the summary.

Comments (0)

Files changed (1)

    sequence="900"
   >
   <send>
-vial_table = []
 world.EnableTrigger("EListPreamble", False)
 world.EnableTrigger("HorizontalLine", True)
 world.EnableTrigger("VialInfo", True)
    sequence="100"
   >
   <send>
+vial_table = []
 world.EnableTrigger("%sListPreamble" % "%1".upper(), True)
 world.SendNoEcho("%sLIST2" % "%1")
   </send>
     world.Note(message)
 
 vial_table = []
+empty_vials = []
 
 def ProcessVial(vial_id, fluid, sips, lifespan):
-    vial_table.append((vial_id, fluid, sips, lifespan))
-    pass
+    if fluid != 'empty':
+        vial_table.append((vial_id, fluid, sips, lifespan))
+    else:
+        empty_vials.append((vial_id, fluid, sips, lifespan))
 
 def DisplayVials():
+    global vial_table
     vial_summary = {}
     vial_totals = {
         'total_sips' : 0,
     Note("----------------------------------------------------------------------")
 
 def RePourVials():
+    global vial_table
+    global empty_vials
+    vial_table.extend(empty_vials)
     vials = sorted(vial_table, VialCompare)
 
     for i in range(len(vials)):
 
                 f_sips = l_sips + f_sips - 200
 
+    vial_table = []
+    empty_vials = []
+
 def VialCompare(a, b):
     if a[3] < b[3]:
         return -1