def send_value(self, value):
		assert self._disabled or value != None
		assert isinstance(value, int)
		assert value in range(128)
		if value != self._last_sent_value:
			if self._mode == SLIDER_MODE_SINGLE:
				ButtonSliderElement.send_value(self, value)
			elif self._mode == SLIDER_MODE_VOLUME:
				self._send_value_volume(value)
			elif self._mode == SLIDER_MODE_PAN:
				self._send_value_pan(value)
			else:
				assert False
			self._last_sent_value = value
Exemplo n.º 2
0
 def send_value(self, value):
     assert self._disabled or value != None
     assert isinstance(value, int)
     assert value in range(128)
     if value != self._last_sent_value:
         if self._mode == SLIDER_MODE_SINGLE:
             ButtonSliderElement.send_value(self, value)
         elif self._mode == SLIDER_MODE_VOLUME:
             self._send_value_volume(value)
         elif self._mode == SLIDER_MODE_PAN:
             self._send_value_pan(value)
         else:
             assert False
         self._last_sent_value = value
 def send_value(self, value):
     if (not self._disabled):
         assert (value != None)
         assert isinstance(value, int)
         assert (value in range(128))
         if (value != self._last_sent_value):
             if (self._mode == SLIDER_MODE_SINGLE):
                 ButtonSliderElement.send_value(self, value)
             elif (self._mode == SLIDER_MODE_VOLUME):
                 self._send_value_volume(value)
             elif (self._mode == SLIDER_MODE_PAN):
                 self._send_value_pan(value)
             else:
                 assert False
             self._last_sent_value = value
 def send_value(self, value):
     if (not self._disabled):
         assert (value != None)
         assert isinstance(value, int)
         assert (value in range(128))
         if (value != self._last_sent_value):
             if (self._mode == SLIDER_MODE_SINGLE):
                 ButtonSliderElement.send_value(self, value)
             elif (self._mode == SLIDER_MODE_VOLUME):
                 self._send_value_volume(value)
             elif (self._mode == SLIDER_MODE_PAN):
                 self._send_value_pan(value)
             else:
                 assert False
             self._last_sent_value = value
Exemplo n.º 5
0
 def send_value(self, value):
     raise self._disabled or value != None or AssertionError
     raise isinstance(value, int) or AssertionError
     if not value in range(128):
         raise AssertionError
         if value != self._last_sent_value:
             if self._mode == SLIDER_MODE_SINGLE:
                 ButtonSliderElement.send_value(self, value)
             elif self._mode == SLIDER_MODE_VOLUME:
                 self._send_value_volume(value)
             elif self._mode == SLIDER_MODE_PAN:
                 self._send_value_pan(value)
             else:
                 raise False or AssertionError
             self._last_sent_value = value