set default memory in run_controller_cli; set center if stick calibration available

This commit is contained in:
Robert Martin
2020-05-09 12:19:38 +02:00
parent a05d3c7ef2
commit 62a7fdec56
3 changed files with 27 additions and 11 deletions
+3 -1
View File
@@ -147,10 +147,12 @@ async def set_amiibo(controller_state, file_path):
async def _main(args):
# parse the spi flash
spi_flash = None
if args.spi_flash:
with open(args.spi_flash, 'rb') as spi_flash_file:
spi_flash = FlashMemory(spi_flash_file.read())
else:
# Create memory containing default controller stick calibration
spi_flash = FlashMemory()
# Get controller name to emulate from arguments
controller = Controller.from_arg(args.controller)