Ejemplo n.º 1
0
 def clearEvents(self):
     try:
         self._non_touch_events.clear()
         self._flushSerialInput()
         TouchDevice.clearEvents(self)
     except Exception, e:
         print2err("Exception During Touch.clearEvents: ",str(e))
Ejemplo n.º 2
0
    def __init__(self,*args,**kwargs):   
        TouchDevice.__init__(self,*args,**kwargs)
        self._non_touch_events=deque(maxlen=64)
        serial_config=self.getConfiguration().get('serial')
        if serial_config:
            sport=serial_config.get('port')
            try:
                sport=int(sport)-1
            except:
                sport=sport
            self.serial_port_num=sport

        self.__class__.force_uncalibrated = False
        self._raw_positions=False
        self._rx_data=''
        self._serial_port_hw=None
        self._connectSerial()
        
        self._elo_hw_config=dict(JUMPERS=self.queryDevice('Jumpers'))#_getJumpers())        
        self._elo_hw_config['OWNER']=self.queryDevice('Owner')
        self._elo_hw_config['ID']=self.queryDevice('ID')
        self._elo_hw_config['REPORT']=self.queryDevice('Report')
        self._elo_hw_config['DIAGNOSTICS']=self.queryDevice('Diagnostics')