Changeset 1083
- Timestamp:
- 10/31/08 09:41:43 (2 months ago)
- Files:
-
- analog/pyeac/branches/pyeac_pygame/controlpanel.py (modified) (1 diff)
- analog/pyeac/branches/pyeac_pygame/eac_physical.py (modified) (2 diffs)
- analog/pyeac/branches/pyeac_pygame/main.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
analog/pyeac/branches/pyeac_pygame/controlpanel.py
r1082 r1083 62 62 63 63 self.tr() 64 self.td(CellControl(pin='1, 4'),align=0)65 self.td(CellControl(pin='2, 4'),align=0)66 self.td(CellControl(pin='3, 4'),align=0)67 self.td(CellControl(pin='4, 4'),align=0)68 self.td(CellControl(pin='5, 4'),align=0)64 self.td(CellControl(pin='1,5'),align=0) 65 self.td(CellControl(pin='2,5'),align=0) 66 self.td(CellControl(pin='3,5'),align=0) 67 self.td(CellControl(pin='4,5'),align=0) 68 self.td(CellControl(pin='5,5'),align=0) 69 69 70 70 class TableBorder(): analog/pyeac/branches/pyeac_pygame/eac_physical.py
r1077 r1083 106 106 107 107 def read_i(self): 108 """ read the sheet voltages at the 25 nodes - places values in voltage_values"""108 """ read the sheet currents at the 25 nodes - places values in voltage_values""" 109 109 self.ser.write('p,i\n') 110 110 self.ser.flush() … … 139 139 def close_port(self): 140 140 self.ser.close() 141 142 def update(self, update_dict, full_form): 143 for key in update_dict.keys(): 144 (x,y,op) = key.split(',') 145 value = update_dict[key] 146 if op == 'type': 147 if value == 'V': 148 self.write_i(int(x),int(y),0) 149 if value == 'I': 150 current_value_key = "%s,%s,current"%(x,y) 151 self.write_i(int(x),int(y),int(full_form[current_value_key])) 152 if value == 'L': 153 pass 154 elif op == 'function': 155 print "lla function changed to",value 156 elif op == "current": 157 self.write_i(int(x),int(y),int(value)) 158 159 141 160 142 161 if __name__ == "__main__": analog/pyeac/branches/pyeac_pygame/main.py
r1082 r1083 77 77 changes = diff_dict(_form_last,_form) 78 78 if changes != None: 79 p rint changes79 phyeac.update(changes,_form) 80 80 simeac_vis.update(simeac.evaluate()) 81 81
