Changeset 1083

Show
Ignore:
Timestamp:
10/31/08 09:41:43 (2 months ago)
Author:
bhimebau
Message:

physical sheet update occuring through the control panel

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • analog/pyeac/branches/pyeac_pygame/controlpanel.py

    r1082 r1083  
    6262 
    6363        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) 
    6969 
    7070class TableBorder(): 
  • analog/pyeac/branches/pyeac_pygame/eac_physical.py

    r1077 r1083  
    106106 
    107107    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""" 
    109109        self.ser.write('p,i\n') 
    110110        self.ser.flush() 
     
    139139    def close_port(self): 
    140140        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 
    141160         
    142161if __name__ == "__main__": 
  • analog/pyeac/branches/pyeac_pygame/main.py

    r1082 r1083  
    7777        changes = diff_dict(_form_last,_form) 
    7878        if changes != None: 
    79             print changes 
     79            phyeac.update(changes,_form) 
    8080            simeac_vis.update(simeac.evaluate()) 
    8181