修复
This commit is contained in:
+2950
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../component/FrequentShower.h"
|
||||
#include "../component/ProgressBar.h"
|
||||
@@ -32,11 +33,20 @@ static renderive::Performance_Overlay_Options radio_performance_options() {
|
||||
options.font.size = 11.0;
|
||||
options.background = renderive::Color{20, 20, 20, 255};
|
||||
options.foreground = renderive::Color::white();
|
||||
options.section_color = renderive::Color{80, 160, 255, 255};
|
||||
options.label_color = renderive::Color{190, 196, 205, 255};
|
||||
options.value_color = renderive::Color{238, 220, 138, 255};
|
||||
options.unit_color = renderive::Color{150, 156, 165, 255};
|
||||
options.warning_color = renderive::Color{255, 96, 96, 255};
|
||||
options.muted_color = renderive::Color{96, 102, 112, 255};
|
||||
options.scroll_track = renderive::Color{55, 55, 55, 220};
|
||||
options.scroll_thumb = renderive::Color{190, 190, 190, 240};
|
||||
options.log.enabled = true;
|
||||
options.log.directory = "performance";
|
||||
options.log.session_name = "radio_latency";
|
||||
return options;
|
||||
}
|
||||
static void apply_radio_performance_overlay(renderive::Latency_Eager_Plot* plot) {
|
||||
static void apply_radio_performance_overlay(renderive::Latency_Eager_Plot* plot, const std::string& plot_name) {
|
||||
static bool logged = false;
|
||||
const bool enabled = radio_show_performance_overlay();
|
||||
if (!logged) {
|
||||
@@ -45,6 +55,7 @@ static void apply_radio_performance_overlay(renderive::Latency_Eager_Plot* plot)
|
||||
}
|
||||
if (!plot || !plot->core())
|
||||
return;
|
||||
renderive::set_performance_plot_name(*plot->core(), plot_name);
|
||||
auto shower = renderive::attach_performance_overlay(*plot->core(), radio_performance_options());
|
||||
if (!shower)
|
||||
return;
|
||||
@@ -137,7 +148,7 @@ QWidget* Radio_Widget::create_spectrogram_power_plot() {
|
||||
};
|
||||
auto w = new Spectrum_Plot;
|
||||
w->init();
|
||||
apply_radio_performance_overlay(w);
|
||||
apply_radio_performance_overlay(w, "spectrum");
|
||||
spectrogram_line = w->sp;
|
||||
if (!radio_mock_perf_mode()) {
|
||||
progress_bar1->set_value = [this]() {
|
||||
@@ -204,7 +215,7 @@ QWidget* Radio_Widget::create_water_fall_plot() {
|
||||
};
|
||||
auto w = new Water_Fall_Plot;
|
||||
w->init();
|
||||
apply_radio_performance_overlay(w);
|
||||
apply_radio_performance_overlay(w, "waterfall");
|
||||
water_fall = w->wf;
|
||||
return w;
|
||||
}
|
||||
@@ -260,7 +271,7 @@ QWidget* Radio_Widget::create_audio_spectrogram_plot() {
|
||||
};
|
||||
auto w = new Spectrum_Plot;
|
||||
w->init();
|
||||
apply_radio_performance_overlay(w);
|
||||
apply_radio_performance_overlay(w, "afterglow");
|
||||
audio_spectrogram_plot = w->sp;
|
||||
return w;
|
||||
}
|
||||
@@ -315,7 +326,7 @@ QWidget* Radio_Widget::create_time_power_plot() {
|
||||
};
|
||||
auto w = new Audio_Plot;
|
||||
w->init();
|
||||
apply_radio_performance_overlay(w);
|
||||
apply_radio_performance_overlay(w, "frequency_trace");
|
||||
time_power = w->audio;
|
||||
return w;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user