(self)
Enters a loop that receives user input to set signal controls.
Enters a loop that receives user input to set signal controls.
Enters a loop that receives user input to set signal controls .
def update_map(self):
    """Enters a loop that receives user input to set signal controls."""
    while True:
      print('')
      self._print_instructions()
      response = input('Selection: ')
      if response == 'q':
        return
      try:
        signal = self._signals[int(response) - 1]
      except (ValueError, IndexError):
        print('Invalid response:', response)
        continue
      self._update_event.clear()
      self._midi_hub.register_callback(
          functools.partial(self._update_signal, signal),
          midi_hub.MidiSignal(type='control_change'))
      print('Send a control signal using the control number you wish to '
            'associate with `%s`.' % signal)
      self._update_event.wait()
def update_map ( self ) : while True : print ( '' ) self . _print_instructions ( ) response = input ( 'Selection: ' ) if response == 'q' : return try : signal = self . _signals [ int ( response ) - 1 ] except ( ValueError , IndexError ) : print ( 'Invalid response:' , response ) continue self . _update_event . clear ( ) self . _midi_hub . register_callback ( functools . partial ( self . _update_signal , signal ) , midi_hub . MidiSignal ( type = 'control_change' ) ) print ( 'Send a control signal using the control number you wish to ' 'associate with `%s`.' % signal ) self . _update_event . wait ( )