From 01e4ff65a21abe7cb72c031b34bd6b849ce7f3ac Mon Sep 17 00:00:00 2001 From: gullradriel <3157857+gullradriel@users.noreply.github.com> Date: Fri, 15 Mar 2024 17:39:34 +0100 Subject: [PATCH] fix butngrid/capture and fix contributor name (#1995) * fixing contributor name * used clear instead of swap --------- Co-authored-by: GullCode --- firmware/application/apps/ui_about_simple.cpp | 4 ++-- firmware/application/ui/ui_btngrid.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/firmware/application/apps/ui_about_simple.cpp b/firmware/application/apps/ui_about_simple.cpp index acc095e7..c691af33 100644 --- a/firmware/application/apps/ui_about_simple.cpp +++ b/firmware/application/apps/ui_about_simple.cpp @@ -13,7 +13,7 @@ AboutView::AboutView(NavigationView& nav) { } void AboutView::update() { - if (++timer > 200) { + if (++timer > 400) { timer = 0; switch (++frame) { @@ -23,7 +23,7 @@ void AboutView::update() { console.writeln(STR_COLOR_DARK_YELLOW "Mayhem:"); console.writeln("eried,euquiq,gregoryfenton"); console.writeln("johnelder,jwetzell,nnemanjan00"); - console.writeln("N0vaPixel,klockee,GullCode"); + console.writeln("N0vaPixel,klockee,gullradriel"); console.writeln("jamesshao8,ITAxReal,rascafr"); console.writeln("mcules,dqs105,strijar"); console.writeln("zhang00963,RedFox-Fr,aldude999"); diff --git a/firmware/application/ui/ui_btngrid.cpp b/firmware/application/ui/ui_btngrid.cpp index ec7cd193..74027612 100644 --- a/firmware/application/ui/ui_btngrid.cpp +++ b/firmware/application/ui/ui_btngrid.cpp @@ -107,12 +107,14 @@ void BtnGridView::on_tick_second() { } void BtnGridView::clear() { - std::vector().swap(menu_items); // clear vector and release memory + // clear vector and release memory, not using swap since it's causing capture to glitch/fault + menu_items.clear(); for (auto& item : menu_item_views) remove_child(item.get()); - std::vector>().swap(menu_item_views); // clear vector and release memory + // clear vector and release memory, not using swap since it's causing capture to glitch/fault + menu_item_views.clear(); } void BtnGridView::add_items(std::initializer_list new_items) {