New stuff

This commit is contained in:
Ryzerth
2020-07-19 15:59:44 +02:00
parent 370324bc68
commit cbf0b6290d
28 changed files with 9162 additions and 393 deletions

View File

@@ -4,6 +4,7 @@
#include <vector>
#include <mutex>
#include <GL/glew.h>
#include <imutils.h>
#define WATERFALL_RESOLUTION 1000000
@@ -30,8 +31,13 @@ namespace ImGui {
void setVFOBandwidth(float bandwidth);
float getVFOBandwidth();
void setVFOReference(int ref);
void setViewBandwidth(float bandWidth);
float getViewBandwidth();
void setViewOffset(float offset);
float getViewOffset();
void setFFTMin(float min);
float getFFTMin();
@@ -50,10 +56,21 @@ namespace ImGui {
void autoRange();
bool centerFreqMoved = false;
bool vfoFreqChanged = false;
enum {
REF_LOWER,
REF_CENTER,
REF_UPPER,
_REF_COUNT
};
private:
void drawWaterfall();
void drawFFT();
void drawVFO();
void onPositionChange();
void onResize();
void updateWaterfallFb();
@@ -70,6 +87,13 @@ namespace ImGui {
ImVec2 lastWidgetPos;
ImVec2 lastWidgetSize;
ImVec2 fftAreaMin;
ImVec2 fftAreaMax;
ImVec2 freqAreaMin;
ImVec2 freqAreaMax;
ImVec2 waterfallAreaMin;
ImVec2 waterfallAreaMax;
ImGuiWindow* window;
GLuint textureId;
@@ -87,6 +111,10 @@ namespace ImGui {
float upperFreq;
float range;
float lastDrag;
int vfoRef = REF_CENTER;
// Absolute values
float centerFreq;
float wholeBandwidth;