From 34db400b725f5eaa6475ccc1df68fe17f70625a0 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Wed, 11 Dec 2024 18:21:19 -0500 Subject: [PATCH] Fixup startup commands --- CHANGELOG.md | 8 ++++++++ src/main.cpp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78901bc..3cdc49b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +### 0.6.0 (2024/12/11) + +* Fix the usecase where an infinite loop would occur if no demo commands. + +### 0.5.0 (2024/11/10) + +* Provide the capability to define startup and demo commands. + ### 0.4.0 (2024/01/04) * Provide EEPROM commands. diff --git a/src/main.cpp b/src/main.cpp index e2990e8..b2e8671 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,6 +69,10 @@ void execute_demo_commands() { if (!demo_enabled) { return; } + // No demo programs defined + if (teensy_to_any_demo_commands[0] == nullptr) { + return; + } while (true) { for (int i = 0; teensy_to_any_demo_commands[i] != nullptr; i++) { cmd.processString(teensy_to_any_demo_commands[i]);