diff --git a/firmware/application/apps/soundboard_app.cpp b/firmware/application/apps/soundboard_app.cpp index b8af1d0f1..4f813f9c8 100644 --- a/firmware/application/apps/soundboard_app.cpp +++ b/firmware/application/apps/soundboard_app.cpp @@ -175,7 +175,8 @@ void SoundBoardView::refresh_list() { for (auto& c : entry_extension) c = toupper(c); - if (entry_extension == ".WAV") { + if (entry_extension == ".WAV" && entry.path().string().find("shopping_cart") == std::string::npos) { + /* ^ because the shopping cart lock app using the speaker to send the LF signal, it's meaningless to be here */ if (reader->open(wav_dir / entry.path())) { if ((reader->channels() == 1) && ((reader->bits_per_sample() == 8) || (reader->bits_per_sample() == 16))) { // sounds[c].ms_duration = reader->ms_duration(); diff --git a/firmware/application/external/random_password/main.cpp b/firmware/application/external/random_password/main.cpp index f92851e10..07edfc99e 100644 --- a/firmware/application/external/random_password/main.cpp +++ b/firmware/application/external/random_password/main.cpp @@ -74,7 +74,7 @@ __attribute__((section(".external_app.app_random_password.application_informatio 0x01, }, /*.icon_color = */ ui::Color::yellow().v, - /*.menu_location = */ app_location_t::UTILITIES, + /*.menu_location = */ app_location_t::RX, /*.desired_menu_position = */ -1, /*.m4_app_tag = portapack::spi_flash::image_tag_afsk_rx */ {'P', 'A', 'F', 'R'}, diff --git a/firmware/application/ui_navigation.cpp b/firmware/application/ui_navigation.cpp index b4a5f2e4c..8d77b1113 100644 --- a/firmware/application/ui_navigation.cpp +++ b/firmware/application/ui_navigation.cpp @@ -158,13 +158,13 @@ const NavigationView::AppList NavigationView::appList = { {"rdstx", "RDS", TX, ui::Color::green(), &bitmap_icon_rds, new ViewFactory()}, {"soundbrd", "Soundbrd", TX, ui::Color::green(), &bitmap_icon_soundboard, new ViewFactory()}, {"touchtune", "TouchTune", TX, ui::Color::green(), &bitmap_icon_touchtunes, new ViewFactory()}, + {"signalgen", "Signal Gen", TX, Color::green(), &bitmap_icon_cwgen, new ViewFactory()}, /* UTILITIES *************************************************************/ {"filemanager", "File Manager", UTILITIES, Color::green(), &bitmap_icon_dir, new ViewFactory()}, {"freqman", "Freq. Manager", UTILITIES, Color::green(), &bitmap_icon_freqman, new ViewFactory()}, {"iqtrim", "IQ Trim", UTILITIES, Color::orange(), &bitmap_icon_trim, new ViewFactory()}, {"notepad", "Notepad", UTILITIES, Color::dark_cyan(), &bitmap_icon_notepad, new ViewFactory()}, {nullptr, "SD Over USB", UTILITIES, Color::yellow(), &bitmap_icon_hackrf, new ViewFactory()}, - {"signalgen", "Signal Gen", UTILITIES, Color::green(), &bitmap_icon_cwgen, new ViewFactory()}, //{"testapp", "Test App", UTILITIES, Color::dark_grey(), nullptr, new ViewFactory()}, // Dangerous apps. {nullptr, "Flash Utility", UTILITIES, Color::red(), &bitmap_icon_peripherals_details, new ViewFactory()}, diff --git a/firmware/common/ui_widget.cpp b/firmware/common/ui_widget.cpp index 80f805a24..357192bc1 100644 --- a/firmware/common/ui_widget.cpp +++ b/firmware/common/ui_widget.cpp @@ -2651,6 +2651,9 @@ bool Waveform::is_paused() const { void Waveform::set_paused(bool paused) { paused_ = paused; + if (!paused) { + if_ever_painted_pause = false; + } set_dirty(); } @@ -2722,26 +2725,28 @@ void Waveform::paint(Painter& painter) { // TODO: this is bad: that it still enter this func and still consume resources. // even do a if(paused_) return; comsume too, but not that much. - // if (dirty()) { - // clear - // painter.fill_rectangle_unrolled8(screen_rect(), Theme::getInstance()->bg_darkest->background); + if (dirty() && !if_ever_painted_pause) { + // clear + painter.fill_rectangle_unrolled8(screen_rect(), Theme::getInstance()->bg_darkest->background); - // // draw "PAUSED" text - // const auto r = screen_rect(); - // painter.draw_string( - // {r.center().x() - 24, r.center().y() - 8}, - // style(), - // "PAUSED"); + // draw "WF HIDDEN" text + const auto r = screen_rect(); + painter.draw_string( + {r.center().x() - 24, r.center().y() - 8}, + style(), + "WF HIDDEN"); + if_ever_painted_pause = true; + } + + if (show_cursors) { + for (uint32_t n = 0; n < 2; n++) { + painter.draw_vline( + Point(std::min(screen_rect().size().width(), (int)cursors[n]), screen_rect().location().y()), + screen_rect().size().height(), + cursor_colors[n]); + } + } - // if (show_cursors) { - // for (uint32_t n = 0; n < 2; n++) { - // painter.draw_vline( - // Point(std::min(screen_rect().size().width(), (int)cursors[n]), screen_rect().location().y()), - // screen_rect().size().height(), - // cursor_colors[n]); - // } - // } - // } return; } diff --git a/firmware/common/ui_widget.hpp b/firmware/common/ui_widget.hpp index 5fa40e731..606c0243d 100644 --- a/firmware/common/ui_widget.hpp +++ b/firmware/common/ui_widget.hpp @@ -1011,6 +1011,7 @@ class Waveform : public Widget { bool show_cursors{false}; bool paused_{false}; bool clickable_{false}; + bool if_ever_painted_pause{false}; // for prevent the "hidden" label keeps painting and being expensive }; class VuMeter : public Widget { diff --git a/sdcard/WAV/noise.wav b/sdcard/WAV/noise.wav deleted file mode 100644 index 458648dac..000000000 Binary files a/sdcard/WAV/noise.wav and /dev/null differ diff --git a/sdcard/WAV/tone square.wav b/sdcard/WAV/tone square.wav deleted file mode 100644 index e37614f91..000000000 Binary files a/sdcard/WAV/tone square.wav and /dev/null differ