77#include < dsp/sink.h>
88#include < gui/widgets/symbol_diagram.h>
99#include < gui/widgets/line_push_image.h>
10+ #include < gui/gui.h>
1011
1112#define NOAA_HRPT_VFO_SR 3000000 .0f
1213#define NOAA_HRPT_VFO_BW 2000000 .0f
@@ -212,72 +213,77 @@ class NOAAHRPTDecoder : public SatDecoder {
212213 ImGui::SetNextItemWidth (menuWidth);
213214 symDiag.draw ();
214215
215- ImGui::Begin (" NOAA HRPT Decoder" );
216- ImGui::BeginTabBar (" NOAAHRPTTabs" );
216+ if (showWindow) {
217+ gui::mainWindow.lockWaterfallControls = true ;
218+ ImGui::Begin (" NOAA HRPT Decoder" );
219+ ImGui::BeginTabBar (" NOAAHRPTTabs" );
220+
221+ if (ImGui::BeginTabItem (" AVHRR RGB(221)" )) {
222+ ImGui::BeginChild (" AVHRRRGBChild" );
223+ ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
224+ avhrrRGBImage.draw ();
225+ ImGui::SetScrollHereY (1 .0f );
226+ ImGui::EndChild ();
227+ ImGui::EndTabItem ();
228+ }
217229
218- if (ImGui::BeginTabItem (" AVHRR RGB(221) " )) {
219- ImGui::BeginChild (" AVHRRRGBChild " );
220- ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
221- avhrrRGBImage .draw ();
222- ImGui::SetScrollHereY (1 .0f );
223- ImGui::EndChild ();
224- ImGui::EndTabItem ();
225- }
230+ if (ImGui::BeginTabItem (" AVHRR 1 " )) {
231+ ImGui::BeginChild (" AVHRR1Child " );
232+ ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
233+ avhrr1Image .draw ();
234+ ImGui::SetScrollHereY (1 .0f );
235+ ImGui::EndChild ();
236+ ImGui::EndTabItem ();
237+ }
226238
227- if (ImGui::BeginTabItem (" AVHRR 1 " )) {
228- ImGui::BeginChild (" AVHRR1Child " );
229- ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
230- avhrr1Image .draw ();
231- ImGui::SetScrollHereY (1 .0f );
232- ImGui::EndChild ();
233- ImGui::EndTabItem ();
234- }
239+ if (ImGui::BeginTabItem (" AVHRR 2 " )) {
240+ ImGui::BeginChild (" AVHRR2Child " );
241+ ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
242+ avhrr2Image .draw ();
243+ ImGui::SetScrollHereY (1 .0f );
244+ ImGui::EndChild ();
245+ ImGui::EndTabItem ();
246+ }
235247
236- if (ImGui::BeginTabItem (" AVHRR 2 " )) {
237- ImGui::BeginChild (" AVHRR2Child " );
238- ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
239- avhrr2Image .draw ();
240- ImGui::SetScrollHereY (1 .0f );
241- ImGui::EndChild ();
242- ImGui::EndTabItem ();
243- }
248+ if (ImGui::BeginTabItem (" AVHRR 3 " )) {
249+ ImGui::BeginChild (" AVHRR3Child " );
250+ ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
251+ avhrr3Image .draw ();
252+ ImGui::SetScrollHereY (1 .0f );
253+ ImGui::EndChild ();
254+ ImGui::EndTabItem ();
255+ }
244256
245- if (ImGui::BeginTabItem (" AVHRR 3 " )) {
246- ImGui::BeginChild (" AVHRR3Child " );
247- ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
248- avhrr3Image .draw ();
249- ImGui::SetScrollHereY (1 .0f );
250- ImGui::EndChild ();
251- ImGui::EndTabItem ();
252- }
257+ if (ImGui::BeginTabItem (" AVHRR 4 " )) {
258+ ImGui::BeginChild (" AVHRR4Child " );
259+ ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
260+ avhrr4Image .draw ();
261+ ImGui::SetScrollHereY (1 .0f );
262+ ImGui::EndChild ();
263+ ImGui::EndTabItem ();
264+ }
253265
254- if (ImGui::BeginTabItem (" AVHRR 4 " )) {
255- ImGui::BeginChild (" AVHRR4Child " );
256- ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
257- avhrr4Image .draw ();
258- ImGui::SetScrollHereY (1 .0f );
259- ImGui::EndChild ();
260- ImGui::EndTabItem ();
261- }
266+ if (ImGui::BeginTabItem (" AVHRR 5 " )) {
267+ ImGui::BeginChild (" AVHRR5Child " );
268+ ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
269+ avhrr5Image .draw ();
270+ ImGui::SetScrollHereY (1 .0f );
271+ ImGui::EndChild ();
272+ ImGui::EndTabItem ();
273+ }
262274
263- if (ImGui::BeginTabItem (" AVHRR 5" )) {
264- ImGui::BeginChild (" AVHRR5Child" );
265- ImGui::SetNextItemWidth (ImGui::GetContentRegionAvailWidth ());
266- avhrr5Image.draw ();
267- ImGui::SetScrollHereY (1 .0f );
268- ImGui::EndChild ();
269- ImGui::EndTabItem ();
270- }
275+ if (ImGui::BeginTabItem (" HIRS" )) {
276+ ImGui::BeginChild (" HIRSChild" );
271277
272- if (ImGui::BeginTabItem (" HIRS" )) {
273- ImGui::BeginChild (" HIRSChild" );
278+ ImGui::EndChild ();
279+ ImGui::EndTabItem ();
280+ }
274281
275- ImGui::EndChild ();
276- ImGui::EndTabItem ();
282+ ImGui::EndTabBar ();
283+ ImGui::End ();
277284 }
278285
279- ImGui::EndTabBar ();
280- ImGui::End ();
286+ ImGui::Checkbox (" Show Image" , &showWindow);
281287 };
282288
283289private:
@@ -561,4 +567,6 @@ class NOAAHRPTDecoder : public SatDecoder {
561567 dsp::stream<uint16_t > compositeIn2;
562568 std::thread compositeThread;
563569
570+ bool showWindow = false ;
571+
564572};
0 commit comments