From 67a804c5baba3727356bfcde2896e5e2d61a168c Mon Sep 17 00:00:00 2001 From: sommermorgentraum <24917424+zxkmm@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:39:02 +0800 Subject: [PATCH] fix progress bar still ongoing after user interraced, in OOKEdit app (#2397) * _ * _ * format --- firmware/application/external/ook_editor/ui_ook_editor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/application/external/ook_editor/ui_ook_editor.cpp b/firmware/application/external/ook_editor/ui_ook_editor.cpp index 7f9ade0e..a4e53ccc 100644 --- a/firmware/application/external/ook_editor/ui_ook_editor.cpp +++ b/firmware/application/external/ook_editor/ui_ook_editor.cpp @@ -57,6 +57,7 @@ void OOKEditorAppView::start_tx() { // `stop_tx` method: Stops the transmission and resets the progress bar. void OOKEditorAppView::stop_tx() { + // TODO: model stopped but message still spamming. is_transmitting = false; // set transmitting flag stop_ook_file_tx(); // stop transmission progressbar.set_value(0); // Reset progress bar to 0 @@ -82,7 +83,7 @@ void OOKEditorAppView::on_file_changed(const fs::path& new_file_path) { // `on_tx_progress` method: Updates the progress bar based on transmission progress. void OOKEditorAppView::on_tx_progress(const uint32_t progress, const bool done) { - progressbar.set_value(progress); // Update progress bar value + if (is_transmitting) progressbar.set_value(progress); // Update progress bar value if (done) { stop_tx(); // Stop transmission when progress reaches maximum }