From faf9a09229d0615e58f9b2a89b7e5ac11a837fcc Mon Sep 17 00:00:00 2001 From: Jesse Millar Date: Mon, 11 May 2020 12:20:29 -0500 Subject: [PATCH] Adding a mash_button function Signed-off-by: Jesse Millar --- run_controller_cli.py | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/run_controller_cli.py b/run_controller_cli.py index c129e1a..8c2f567 100644 --- a/run_controller_cli.py +++ b/run_controller_cli.py @@ -22,7 +22,7 @@ logger = logging.getLogger(__name__) While running the cli, call "help" for an explanation of available commands. Usage: - run_controller_cli.py [--device_id | -d ] + run_controller_cli.py [--device_id | -d ] [--spi_flash ] [--reconnect_bt_addr | -r ] [--log | -l ] @@ -33,7 +33,7 @@ Arguments: Options: -d --device_id ID of the bluetooth adapter. Integer matching the digit in the hci* notation - (e.g. hci0, hci1, ...) or Bluetooth mac address of the adapter in string + (e.g. hci0, hci1, ...) or Bluetooth mac address of the adapter in string notation (e.g. "FF:FF:FF:FF:FF:FF"). Note: Selection of adapters may not work if the bluez "input" plugin is enabled. @@ -41,11 +41,11 @@ Options: --spi_flash Memory dump of a real Switch controller. Required for joystick emulation. Allows displaying of JoyCon colors. Memory dumps can be created using the dump_spi_flash.py script. - - -r --reconnect_bt_addr Previously connected Switch console Bluetooth address in string + + -r --reconnect_bt_addr Previously connected Switch console Bluetooth address in string notation (e.g. "FF:FF:FF:FF:FF:FF") for reconnection. Does not require the "Change Grip/Order" menu to be opened, - + -l --log Write hid communication (input reports and output reports) to a file. """ @@ -180,6 +180,39 @@ async def _main(args): # add the script from above cli.add_command('test_buttons', _run_test_controller_buttons) + # Mash a button command + async def mash_button(*args): + """ + mash_button - Mash a specified button at a set interval + + Usage: + mash_button