etc/makefiles: Call bin/focus-send to do the device reset

Instead of simply echoing "device.reset" into the device port, call
`bin/focus-send`, which sets the `raw` setting on the port, before writing into
it. Without that, the command is not recognised by the firmware.

We could do the stty call in the makefile directly, but to support macOS, we'd
need to treat that specially, and at that point, it's easier to just call
`bin/focus-send`. The sketch relies on having the Kaleidoscope repo available
anyway, so we can safely rely on `bin/focus-send` being there, too.

Because we're now using the tool in the makefiles, `focus-test` was renamed to
`focus-send`.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/1210/head
Gergely Nagy 2 years ago
parent bc0466aa22
commit 9b9911bdb5
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# focus-test - Trivial Focus testing tool
# Copyright (C) 2018 Keyboard.io, Inc.
# focus-send - Trivial Focus testing tool
# Copyright (C) 2018-2022 Keyboard.io, Inc.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software

@ -207,7 +207,7 @@ endif
@$(shell read _)
# If we have a device serial port available, try to trigger a Kaliedoscope reset
ifneq ($(_device_port),)
$(QUIET) echo "device.reset" > $(_device_port)
$(QUIET) DEVICE=$(_device_port) $(KALEIDOSCOPE_DIR)/bin/focus-send "device.reset"
sleep 2
endif
$(QUIET) $(ARDUINO_CLI) upload --fqbn $(FQBN) \

Loading…
Cancel
Save