diff --git a/module/radio/BackEnd/RadioWidget.cpp b/module/radio/BackEnd/RadioWidget.cpp index ae3e34f..6ddfb92 100644 --- a/module/radio/BackEnd/RadioWidget.cpp +++ b/module/radio/BackEnd/RadioWidget.cpp @@ -25,8 +25,8 @@ static bool radio_show_performance_overlay() { static void configure_radio_plot_perf(renderive::Plot* plot) { if (!radio_mock_perf_mode()) return; - plot->set_render_check_fps(1000); - plot->set_render_schedule_mode(renderive::Plot_Render_Schedule_Mode::Chase_Latest); + plot->set_max_render_fps(1000); + plot->set_render_schedule_mode(renderive::Plot_Render_Schedule_Mode::Feedback); if (radio_show_performance_overlay()) plot->set_use_performance_shower(true); } diff --git a/module/radio/component/ProgressBar.h b/module/radio/component/ProgressBar.h index 3eed36c..1387458 100644 --- a/module/radio/component/ProgressBar.h +++ b/module/radio/component/ProgressBar.h @@ -4,20 +4,17 @@ #include #include #include "../Global.h" - -struct Tick{ +struct Tick { QString text; QColor color; double value = 0; - Tick(QString text, QColor color) : text(std::move(text)), color(std::move(color)){ - QString that = (text[0] == '+' || text[0] == '-' || text[0] == '<' || text[0] == '>') ? text.mid(1) : text; + Tick(QString text, QColor color) : text(std::move(text)), color(std::move(color)) { + QString that = (this->text.startsWith('+') || this->text.startsWith('-') || this->text.startsWith('<') || this->text.startsWith('>')) ? this->text.mid(1) : this->text; value = that.toDouble(); } - Tick(QString text, QColor color, double value) : text(std::move(text)), color(std::move(color)), value(value){ + Tick(QString text, QColor color, double value) : text(std::move(text)), color(std::move(color)), value(value) { } }; - - class Progress_Bar : public QWidget { public: explicit Progress_Bar(const std::vector& tick_list, QWidget *parent = nullptr); @@ -35,6 +32,3 @@ protected: std::vector tick_list; }; #endif - - -