From b528e01a1e54b1aeb6a48459a47e3149fab64d41 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sat, 14 Nov 2020 18:50:04 -0800 Subject: [PATCH] move prompt before flashing back into the flash target --- bin/kaleidoscope-builder | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index 2d757817..6b67b178 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -169,7 +169,15 @@ _find_sketch() { exit 1 } -_prompt_before_flashing() { +} + + +cmd_flash() { + _set_up_environment + #TODO (arduino team) I'd love to do this with their json output + #but it's short some of the data we kind of need + port=$(_run_arduino_cli board list --format=text | grep "$FQBN" |cut -d' ' -f 1) + flashing_instructions=$(_arduino_prop 'build.flashing_instructions') : "${flashing_instructions:="If your keyboard needs you to do something to put it in flashing mode, do that now."}" @@ -179,15 +187,7 @@ _prompt_before_flashing() { # We do not want to permit line continuations here. We just want a newline. # shellcheck disable=SC2162 read -} - -cmd_flash() { - _set_up_environment - #TODO (arduino team) I'd love to do this with their json output - #but it's short some of the data we kind of need - port=$(_run_arduino_cli board list --format=text | grep "$FQBN" |cut -d' ' -f 1) - _prompt_before_flashing _run_arduino_cli upload --fqbn "${FQBN}" --port "${port}" "${ARDUINO_VERBOSE}" }