From d9a0243905f8b408cb3a81b6e85b9597dc6ad3bb Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Sun, 1 Aug 2021 14:48:47 +0200 Subject: [PATCH] Slight fixes on the hrpt decoder and new version --- core/src/version.h | 2 +- weather_sat_decoder/src/noaa_hrpt_decoder.h | 134 +++++++++++--------- 2 files changed, 72 insertions(+), 64 deletions(-) diff --git a/core/src/version.h b/core/src/version.h index d522347c..8c343671 100644 --- a/core/src/version.h +++ b/core/src/version.h @@ -1,3 +1,3 @@ #pragma once -#define VERSION_STR "1.0.0_rc5" \ No newline at end of file +#define VERSION_STR "1.0.0" \ No newline at end of file diff --git a/weather_sat_decoder/src/noaa_hrpt_decoder.h b/weather_sat_decoder/src/noaa_hrpt_decoder.h index 153f9c55..8baccb93 100644 --- a/weather_sat_decoder/src/noaa_hrpt_decoder.h +++ b/weather_sat_decoder/src/noaa_hrpt_decoder.h @@ -7,6 +7,7 @@ #include #include #include +#include #define NOAA_HRPT_VFO_SR 3000000.0f #define NOAA_HRPT_VFO_BW 2000000.0f @@ -212,72 +213,77 @@ public: ImGui::SetNextItemWidth(menuWidth); symDiag.draw(); - ImGui::Begin("NOAA HRPT Decoder"); - ImGui::BeginTabBar("NOAAHRPTTabs"); + if (showWindow) { + gui::mainWindow.lockWaterfallControls = true; + ImGui::Begin("NOAA HRPT Decoder"); + ImGui::BeginTabBar("NOAAHRPTTabs"); - if (ImGui::BeginTabItem("AVHRR RGB(221)")) { - ImGui::BeginChild("AVHRRRGBChild"); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); - avhrrRGBImage.draw(); - ImGui::SetScrollHereY(1.0f); - ImGui::EndChild(); - ImGui::EndTabItem(); + if (ImGui::BeginTabItem("AVHRR RGB(221)")) { + ImGui::BeginChild("AVHRRRGBChild"); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); + avhrrRGBImage.draw(); + ImGui::SetScrollHereY(1.0f); + ImGui::EndChild(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("AVHRR 1")) { + ImGui::BeginChild("AVHRR1Child"); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); + avhrr1Image.draw(); + ImGui::SetScrollHereY(1.0f); + ImGui::EndChild(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("AVHRR 2")) { + ImGui::BeginChild("AVHRR2Child"); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); + avhrr2Image.draw(); + ImGui::SetScrollHereY(1.0f); + ImGui::EndChild(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("AVHRR 3")) { + ImGui::BeginChild("AVHRR3Child"); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); + avhrr3Image.draw(); + ImGui::SetScrollHereY(1.0f); + ImGui::EndChild(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("AVHRR 4")) { + ImGui::BeginChild("AVHRR4Child"); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); + avhrr4Image.draw(); + ImGui::SetScrollHereY(1.0f); + ImGui::EndChild(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("AVHRR 5")) { + ImGui::BeginChild("AVHRR5Child"); + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); + avhrr5Image.draw(); + ImGui::SetScrollHereY(1.0f); + ImGui::EndChild(); + ImGui::EndTabItem(); + } + + if (ImGui::BeginTabItem("HIRS")) { + ImGui::BeginChild("HIRSChild"); + + ImGui::EndChild(); + ImGui::EndTabItem(); + } + + ImGui::EndTabBar(); + ImGui::End(); } - if (ImGui::BeginTabItem("AVHRR 1")) { - ImGui::BeginChild("AVHRR1Child"); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); - avhrr1Image.draw(); - ImGui::SetScrollHereY(1.0f); - ImGui::EndChild(); - ImGui::EndTabItem(); - } - - if (ImGui::BeginTabItem("AVHRR 2")) { - ImGui::BeginChild("AVHRR2Child"); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); - avhrr2Image.draw(); - ImGui::SetScrollHereY(1.0f); - ImGui::EndChild(); - ImGui::EndTabItem(); - } - - if (ImGui::BeginTabItem("AVHRR 3")) { - ImGui::BeginChild("AVHRR3Child"); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); - avhrr3Image.draw(); - ImGui::SetScrollHereY(1.0f); - ImGui::EndChild(); - ImGui::EndTabItem(); - } - - if (ImGui::BeginTabItem("AVHRR 4")) { - ImGui::BeginChild("AVHRR4Child"); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); - avhrr4Image.draw(); - ImGui::SetScrollHereY(1.0f); - ImGui::EndChild(); - ImGui::EndTabItem(); - } - - if (ImGui::BeginTabItem("AVHRR 5")) { - ImGui::BeginChild("AVHRR5Child"); - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvailWidth()); - avhrr5Image.draw(); - ImGui::SetScrollHereY(1.0f); - ImGui::EndChild(); - ImGui::EndTabItem(); - } - - if (ImGui::BeginTabItem("HIRS")) { - ImGui::BeginChild("HIRSChild"); - - ImGui::EndChild(); - ImGui::EndTabItem(); - } - - ImGui::EndTabBar(); - ImGui::End(); + ImGui::Checkbox("Show Image", &showWindow); }; private: @@ -561,4 +567,6 @@ private: dsp::stream compositeIn2; std::thread compositeThread; + bool showWindow = false; + }; \ No newline at end of file