2 from __future__
import print_function
9 roslib.load_manifest(
'jsk_teleop_joy')
13 return ((ref | val) >> 4 == (ref >> 4))
17 controller = pygame.midi.Input(int(sys.argv[1]))
19 while controller.poll():
20 data = controller.read(1)
22 midi_command = elem_set[0][0]
23 print(elem_set[0], end=
' ')
24 print(
"(0x%X, 0x%X, 0x%X)" % (midi_command, elem_set[0][1], elem_set[0][2]), end=
' ')
25 print(MIDICommand.toStr(MIDICommand.detect(midi_command)))
29 if __name__ ==
"__main__":
def checkUpperByte(ref, val)