7
7
#include < dsp/sink.h>
8
8
#include < gui/widgets/symbol_diagram.h>
9
9
#include < gui/widgets/line_push_image.h>
10
+ #include < gui/gui.h>
10
11
11
12
#define NOAA_HRPT_VFO_SR 3000000 .0f
12
13
#define NOAA_HRPT_VFO_BW 2000000 .0f
@@ -212,72 +213,77 @@ class NOAAHRPTDecoder : public SatDecoder {
212
213
ImGui::SetNextItemWidth (menuWidth);
213
214
symDiag.draw ();
214
215
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
+ }
217
229
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
+ }
226
238
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
+ }
235
247
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
+ }
244
256
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
+ }
253
265
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
+ }
262
274
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" );
271
277
272
- if (ImGui::BeginTabItem (" HIRS" )) {
273
- ImGui::BeginChild (" HIRSChild" );
278
+ ImGui::EndChild ();
279
+ ImGui::EndTabItem ();
280
+ }
274
281
275
- ImGui::EndChild ();
276
- ImGui::EndTabItem ();
282
+ ImGui::EndTabBar ();
283
+ ImGui::End ();
277
284
}
278
285
279
- ImGui::EndTabBar ();
280
- ImGui::End ();
286
+ ImGui::Checkbox (" Show Image" , &showWindow);
281
287
};
282
288
283
289
private:
@@ -561,4 +567,6 @@ class NOAAHRPTDecoder : public SatDecoder {
561
567
dsp::stream<uint16_t > compositeIn2;
562
568
std::thread compositeThread;
563
569
570
+ bool showWindow = false ;
571
+
564
572
};
0 commit comments