mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-28 05:17:50 +02:00
readme.md
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
#include <imgui/stb_image.h>
|
||||
|
||||
namespace icons {
|
||||
ImTextureID LOGO;
|
||||
ImTextureID PLAY;
|
||||
ImTextureID STOP;
|
||||
ImTextureID PLAY_RAW;
|
||||
@ -24,6 +25,7 @@ namespace icons {
|
||||
}
|
||||
|
||||
void load() {
|
||||
LOGO = (ImTextureID)loadTexture("res/icons/logo.png");
|
||||
PLAY_RAW = (ImTextureID)loadTexture("res/icons/play_raw.png");
|
||||
STOP_RAW = (ImTextureID)loadTexture("res/icons/stop_raw.png");
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <GL/glew.h>
|
||||
|
||||
namespace icons {
|
||||
extern ImTextureID LOGO;
|
||||
extern ImTextureID PLAY;
|
||||
extern ImTextureID STOP;
|
||||
extern ImTextureID PLAY_RAW;
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <main_window.h>
|
||||
#include <styles.h>
|
||||
#include <icons.h>
|
||||
#include <version.h>
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -34,7 +35,7 @@ int main() {
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // Required on Mac
|
||||
|
||||
// Create window with graphics context
|
||||
GLFWwindow* window = glfwCreateWindow(1280, 720, "SDR++ v0.1.0 (Built at " __TIME__ ", " __DATE__ ")", NULL, NULL);
|
||||
GLFWwindow* window = glfwCreateWindow(1280, 720, "SDR++ v" VERSION_STR " (Built at " __TIME__ ", " __DATE__ ")", NULL, NULL);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
glfwMakeContextCurrent(window);
|
||||
|
@ -211,13 +211,6 @@ void drawWindow() {
|
||||
fSel.setFrequency(wtf.getCenterFrequency() + wtf.getVFOOfset());
|
||||
}
|
||||
|
||||
// vfoFreq = wtf.getVFOOfset() + freq;
|
||||
|
||||
// if (vfoFreq != lastVfoFreq) {
|
||||
// lastVfoFreq = vfoFreq;
|
||||
// sigPath.setVFOFrequency(vfoFreq - freq);
|
||||
// }
|
||||
|
||||
if (volume != lastVolume) {
|
||||
lastVolume = volume;
|
||||
sigPath.setVolume(volume);
|
||||
@ -239,26 +232,6 @@ void drawWindow() {
|
||||
bw = sampleRate;
|
||||
}
|
||||
|
||||
|
||||
// if (ImGui::BeginMenuBar())
|
||||
// {
|
||||
// if (ImGui::BeginMenu("File"))
|
||||
// {
|
||||
// ImGui::EndMenu();
|
||||
// }
|
||||
// if (ImGui::BeginMenu("Edit"))
|
||||
// {
|
||||
// ImGui::MenuItem("Show Example Window", "", &showExample);
|
||||
// ImGui::EndMenu();
|
||||
// }
|
||||
// ImGui::EndMenuBar();
|
||||
// }
|
||||
|
||||
if (showExample) {
|
||||
ImGui::ShowDemoWindow();
|
||||
}
|
||||
|
||||
|
||||
ImVec2 vMin = ImGui::GetWindowContentRegionMin();
|
||||
ImVec2 vMax = ImGui::GetWindowContentRegionMax();
|
||||
|
||||
@ -290,12 +263,16 @@ void drawWindow() {
|
||||
|
||||
fSel.draw();
|
||||
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8);
|
||||
ImGui::SameLine(ImGui::GetWindowWidth() - 40);
|
||||
ImGui::Image(icons::LOGO, ImVec2(30, 30));
|
||||
|
||||
|
||||
ImGui::Columns(3, "WindowColumns", false);
|
||||
ImVec2 winSize = ImGui::GetWindowSize();
|
||||
ImGui::SetColumnWidth(0, 300);
|
||||
ImGui::SetColumnWidth(1, winSize.x - 300 - 50);
|
||||
ImGui::SetColumnWidth(2, 50);
|
||||
ImGui::SetColumnWidth(1, winSize.x - 300 - 60);
|
||||
ImGui::SetColumnWidth(2, 60);
|
||||
|
||||
// Left Column
|
||||
ImGui::BeginChild("Left Column");
|
||||
@ -303,7 +280,14 @@ void drawWindow() {
|
||||
if (ImGui::CollapsingHeader("Source")) {
|
||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x);
|
||||
ImGui::Combo("##_0_", &devId, soapy.txtDevList.c_str());
|
||||
ImGui::Combo("##_1_", &srId, soapy.txtSampleRateList.c_str());
|
||||
|
||||
if (!playing) {
|
||||
ImGui::Combo("##_1_", &srId, soapy.txtSampleRateList.c_str());
|
||||
}
|
||||
else {
|
||||
ImGui::Text("%s Samples/s", soapy.txtSampleRateList.c_str());
|
||||
}
|
||||
|
||||
|
||||
if (ImGui::Button("Refresh")) {
|
||||
soapy.refresh();
|
||||
@ -380,23 +364,26 @@ void drawWindow() {
|
||||
ImGui::NextColumn();
|
||||
|
||||
ImGui::Text("Zoom");
|
||||
ImGui::NewLine();
|
||||
ImGui::VSliderFloat("##_7_", ImVec2(20.0f, 150.0f), &bw, 1000.0f, sampleRate, "");
|
||||
|
||||
ImGui::Text("Max");
|
||||
ImGui::NewLine();
|
||||
|
||||
ImGui::Text("Max");
|
||||
ImGui::VSliderFloat("##_8_", ImVec2(20.0f, 150.0f), &fftMax, -100.0f, 0.0f, "");
|
||||
|
||||
ImGui::Text("Min");
|
||||
ImGui::NewLine();
|
||||
|
||||
ImGui::Text("Min");
|
||||
ImGui::VSliderFloat("##_9_", ImVec2(20.0f, 150.0f), &fftMin, -100.0f, 0.0f, "");
|
||||
|
||||
if (bw != lastBW) {
|
||||
lastBW = bw;
|
||||
wtf.setViewOffset(wtf.getVFOOfset());
|
||||
wtf.setViewBandwidth(bw);
|
||||
wtf.setViewOffset(wtf.getVFOOfset());
|
||||
}
|
||||
|
||||
|
||||
|
||||
wtf.setFFTMin(fftMin);
|
||||
wtf.setFFTMax(fftMax);
|
||||
wtf.setWaterfallMin(fftMin);
|
||||
|
@ -32,17 +32,6 @@ void SignalPath::init(uint64_t sampleRate, int fftRate, int fftSize, dsp::stream
|
||||
audio.init(&audioResamp.output, 16);
|
||||
}
|
||||
|
||||
|
||||
dsp::DCBiasRemover dcBiasRemover;
|
||||
dsp::Splitter split;
|
||||
dsp::BlockDecimator fftBlockDec;
|
||||
dsp::HandlerSink fftHandlerSink;
|
||||
dsp::VFO mainVFO;
|
||||
dsp::FMDemodulator demod;
|
||||
dsp::AMDemodulator amDemod;
|
||||
dsp::FloatResampler audioResamp;
|
||||
io::AudioSink audio;
|
||||
|
||||
void SignalPath::setSampleRate(float sampleRate) {
|
||||
dcBiasRemover.stop();
|
||||
split.stop();
|
||||
|
@ -13,8 +13,4 @@ void setImguiStyle(ImGuiIO& io) {
|
||||
|
||||
ImGui::StyleColorsDark();
|
||||
//ImGui::StyleColorsLight();
|
||||
|
||||
//ImGui::GetStyle().Colors[ImGuiCol_Header] = ImVec4(0.235f, 0.235f, 0.235f, 1.0f);
|
||||
//ImGui::GetStyle().Colors[ImGuiCol_HeaderHovered] = ImVec4(0.235f, 0.235f, 0.235f, 1.0f);
|
||||
//ImGui::GetStyle().Colors[ImGuiCol_HeaderActive] = ImVec4(0.235f, 0.235f, 0.235f, 1.0f);
|
||||
}
|
3
src/version.h
Normal file
3
src/version.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define VERSION_STR "0.2.1_alpha"
|
Reference in New Issue
Block a user