+ elif command == "bind":
+ if id == 'tx-f':
+ mtrf_command = { "mode": 2, "ch": channel, "cmd": 15 }
+ elif id == 'tx':
+ mtrf_command = { "mode": 0, "ch": channel, "cmd": 15 }
+ elif id == 'rx':
+ mtrf_command = { "mode": 1, "ch": channel, "cmd": 15 }
+ elif id == 'rx-f':
+ mtrf_command = { "mode": 3, "ch": channel, "cmd": 15 }
+ else:
+ mtrf_command = { "mode": 0, "ch": channel, "cmd": 15 }
+ elif command == "unbind":
+ if id == '.' or id == 'tx-f':
+ mtrf_command = { "mode": 2, "ch": channel, "cmd": 9 }
+ elif id == 'tx':
+ mtrf_command = { "mode": 0, "ch": channel, "cmd": 9 }
+ elif id == 'rx':
+ mtrf_command = { "mode": 1, "ch": channel, "cmd": 9, "ctr": 5 }
+ elif id == 'rx-f':
+ mtrf_command = { "mode": 3, "ch": channel, "cmd": 9, "ctr": 5 }
+ else:
+ mtrf_command = { "mode": 0, "ch": channel, "cmd": 9 }
+ elif command == "service":
+ if id == '.':
+ mtrf_command = { "mode": 2, "ch": channel, "cmd": 131, "d0": 1 }
+ elif id:
+ mtrf_command = { "mode": 2, "ch": channel, "cmd": 131, "d0": 1, "id0": int(id[0:2],16), "id1": int(id[2:4],16), "id2": int(id[4:6],16), "id3": int(id[6:8],16), "ctr": 8 }