Skip to content

Commit 3d5ffb7

Browse files
committed
MCU8MASS-1766 Remove spaces from input during provisioning
1 parent a825a00 commit 3d5ffb7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/provision/provision.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#define ASCII_LINE_FEED (0xA)
5151
#define ASCII_BACKSPACE (0x8)
5252
#define ASCII_DELETE (0x7F)
53+
#define ASCII_SPACE (0x20)
5354

5455
#define SerialModule Serial3
5556

@@ -328,6 +329,10 @@ static bool readUntilNewLine(char* output_buffer,
328329

329330
uint8_t input = SerialModule.read();
330331

332+
if (input == ASCII_SPACE) {
333+
continue;
334+
}
335+
331336
if (input == ASCII_CARRIAGE_RETURN || input == ASCII_LINE_FEED) {
332337
break;
333338
} else if (input == ASCII_BACKSPACE || input == ASCII_DELETE) {

0 commit comments

Comments
 (0)