Added SNR meter

This commit is contained in:
Ryzerth
2021-04-30 04:28:08 +02:00
parent 3e79d4dfad
commit 96f83ee55c
5 changed files with 123 additions and 4 deletions

View File

@@ -32,6 +32,7 @@
#include <gui/dialogs/loading_screen.h>
#include <options.h>
#include <gui/colormaps.h>
#include <gui/widgets/snr_meter.h>
int fftSize = 8192 * 8;
@@ -103,6 +104,8 @@ bool centerTuning = false;
dsp::stream<dsp::complex_t> dummyStream;
bool demoWindow = false;
float testSNR = 50;
void windowInit() {
LoadingScreen::show("Initializing UI");
gui::waterfall.init();
@@ -515,6 +518,13 @@ void drawWindow() {
ImGui::SameLine();
ImGui::SetCursorPosX(ImGui::GetWindowSize().x - 387);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5);
ImGui::SetNextItemWidth(300);
ImGui::SNRMeter((vfo != NULL) ? gui::waterfall.selectedVFOSNR : 0);
ImGui::SameLine();
// Logo button
ImGui::SetCursorPosX(ImGui::GetWindowSize().x - 48);
ImGui::SetCursorPosY(10);
@@ -604,6 +614,8 @@ void drawWindow() {
firstMenuRender = true;
}
ImGui::SliderFloat("Testing SNR meter", &testSNR, 0, 100);
ImGui::Spacing();
}