From 44e7b76157ce12933bef5ecbb7bb645cc8d3a8ff Mon Sep 17 00:00:00 2001 From: Matthew McGowan Date: Mon, 7 Mar 2016 22:09:19 +0100 Subject: [PATCH] consume all data after the first keypress (e.g. on windows it might send CR+LF.) --- README.md | 4 ++-- firmware/CHANGELOG.md | 8 ++++++++ firmware/examples/Norwegian_Blue.cpp | 2 +- spark.json | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b5d8df2..921fc23 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ The simplest way is to use the Particle WebIDE: Alternatively, you can download the latest release for your programmer device from the [Releases](https://github.com/m-mcgowan/embedded-swd/releases) page on GitHub. -Once the app has been flashed, the device will breathe white - it doesn't connect to the cloud or use Wi-Fi. +Once the app has been flashed, the device will show a steady blue LED. The device doesn't connect to the cloud or use Wi-Fi. ### Using the Programmer App @@ -59,7 +59,7 @@ Once the app has been flashed, the device will breathe white - it doesn't connec - Read the messages that appear. - If you're sure you want to continue flashing the target device, type `Y` and press return. - Follow the on-screen prompts. -- Once flashing is complete, your target device should be showing signs of life via the main LED! +- Once flashing is complete, your target device should be showing signs of life via the main LED! The programmer LED turns green. diff --git a/firmware/CHANGELOG.md b/firmware/CHANGELOG.md index d19bdaa..3edbb69 100644 --- a/firmware/CHANGELOG.md +++ b/firmware/CHANGELOG.md @@ -1,3 +1,11 @@ + +# 0.1.3 + +## Bugfixes + +- Consume all input after the initial keypress. (Fixes issue on Windows where the pressing enter sends CR+LF, but only one character was consumed.) + + # 0.1.2 ## Features diff --git a/firmware/examples/Norwegian_Blue.cpp b/firmware/examples/Norwegian_Blue.cpp index 85d872d..208bd72 100644 --- a/firmware/examples/Norwegian_Blue.cpp +++ b/firmware/examples/Norwegian_Blue.cpp @@ -51,7 +51,7 @@ class Fixit RGB.control(true); RGB.color(0,0,255); while (!Serial.available()) {} - Serial.read(); + while (Serial.available()) Serial.read(); } uint8_t option(const char* msg, std::initializer_list opts, int def=-1, bool listOpts=true) diff --git a/spark.json b/spark.json index 1945c79..7924b03 100644 --- a/spark.json +++ b/spark.json @@ -1,6 +1,6 @@ { "name": "swd", - "version": "0.1.2", + "version": "0.1.3", "author": "mdma ", "license": "LGPLv3", "description": "Implements the SWD protocol and STM32F2xx flash operations. This allows one device to program another by connecting 2 data lines."