mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
30 lines
No EOL
557 B
C++
30 lines
No EOL
557 B
C++
#pragma once
|
|
|
|
#include "imgui/imgui.h"
|
|
#include <mutex>
|
|
|
|
namespace widgets
|
|
{
|
|
class FFTPlot
|
|
{
|
|
private:
|
|
float *values;
|
|
int values_size;
|
|
std::mutex work_mutex;
|
|
|
|
public:
|
|
float scale_min, scale_max;
|
|
float scale_resolution;
|
|
|
|
public:
|
|
FFTPlot(float *v, int size, float min, float max, float scale_res = 20);
|
|
void draw(ImVec2 size);
|
|
|
|
void set_size(int size)
|
|
{
|
|
work_mutex.lock();
|
|
values_size = size;
|
|
work_mutex.unlock();
|
|
}
|
|
};
|
|
} |