mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
38 lines
No EOL
1 KiB
C++
38 lines
No EOL
1 KiB
C++
#pragma once
|
|
|
|
#include "common/dsp/complex.h"
|
|
#include "common/dsp/utils/random.h"
|
|
#include "core/style.h"
|
|
#include "imgui/imgui.h"
|
|
#include "imgui/implot/implot.h"
|
|
#include <cstring>
|
|
#include <mutex>
|
|
|
|
namespace satdump
|
|
{
|
|
namespace widgets
|
|
{
|
|
#define HIST_SIZE 2048
|
|
|
|
class HistoViewer
|
|
{
|
|
private:
|
|
complex_t sample_buffer_complex_float[HIST_SIZE];
|
|
const int d_histo_size;
|
|
dsp::Random rng;
|
|
std::mutex mtx;
|
|
|
|
public:
|
|
float d_hscale, d_vscale;
|
|
|
|
public:
|
|
HistoViewer(float hscale = 1, float vscale = 1, int histo_size = 200);
|
|
~HistoViewer();
|
|
void pushComplexScaled(complex_t *buffer, int size, float scale);
|
|
void pushComplex(complex_t *buffer, int size);
|
|
void pushFloatAndGaussian(float *buffer, int size);
|
|
void pushSofttAndGaussian(int8_t *buffer, float scale, int size);
|
|
void draw();
|
|
};
|
|
} // namespace widgets
|
|
} // namespace satdump
|