(self, etype, code, value)
Writes a event to the device, if it has changed.
Writes a event to the device, if it has changed.
Writes a event to the device if it has changed .
def write_event(self, etype, code, value):
        """Writes a event to the device, if it has changed."""
        last_value = self._write_cache.get(code)
        if last_value != value:
            self.device.write(etype, code, value)
            self._write_cache[code] = value
def write_event ( self , etype , code , value ) : last_value = self . _write_cache . get ( code ) if last_value != value : self . device . write ( etype , code , value ) self . _write_cache [ code ] = value