mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-24 01:48:28 +01:00
New changes
This commit is contained in:
parent
58864b79e4
commit
64436f1034
@ -106,8 +106,10 @@ int sdrpp_main(int argc, char *argv[]) {
|
||||
defConfig["bandPlanEnabled"] = true;
|
||||
defConfig["centerTuning"] = false;
|
||||
defConfig["colorMap"] = "Classic";
|
||||
defConfig["fastFFT"] = true;
|
||||
defConfig["fftHeight"] = 300;
|
||||
defConfig["frequency"] = 100000000.0;
|
||||
defConfig["fullWaterfallUpdate"] = true;
|
||||
defConfig["max"] = 0.0;
|
||||
defConfig["maximized"] = false;
|
||||
defConfig["menuOrder"] = {
|
||||
|
@ -8,6 +8,7 @@
|
||||
namespace displaymenu {
|
||||
bool showWaterfall;
|
||||
bool fastFFT = true;
|
||||
bool fullWaterfallUpdate = true;
|
||||
int colorMapId = 0;
|
||||
std::vector<std::string> colorMapNames;
|
||||
std::string colorMapNamesTxt = "";
|
||||
@ -31,6 +32,12 @@ namespace displaymenu {
|
||||
colorMapAuthor = map.author;
|
||||
}
|
||||
}
|
||||
|
||||
fastFFT = core::configManager.conf["fastFFT"];
|
||||
gui::waterfall.setFastFFT(fastFFT);
|
||||
|
||||
fullWaterfallUpdate = core::configManager.conf["fullWaterfallUpdate"];
|
||||
gui::waterfall.setFullWaterfallUpdate(fullWaterfallUpdate);
|
||||
}
|
||||
|
||||
void draw(void* ctx) {
|
||||
@ -59,6 +66,16 @@ namespace displaymenu {
|
||||
|
||||
if (ImGui::Checkbox("Fast FFT", &fastFFT)) {
|
||||
gui::waterfall.setFastFFT(fastFFT);
|
||||
core::configManager.aquire();
|
||||
core::configManager.conf["fastFFT"] = fastFFT;
|
||||
core::configManager.release(true);
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Full Waterfall Update", &fullWaterfallUpdate)) {
|
||||
gui::waterfall.setFullWaterfallUpdate(fullWaterfallUpdate);
|
||||
core::configManager.aquire();
|
||||
core::configManager.conf["fullWaterfallUpdate"] = fullWaterfallUpdate;
|
||||
core::configManager.release(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -320,7 +320,7 @@ namespace ImGui {
|
||||
|
||||
if (viewBandwidth != wholeBandwidth) {
|
||||
updateAllVFOs();
|
||||
updateWaterfallFb();
|
||||
if (_fullUpdate) { updateWaterfallFb(); };
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -718,7 +718,7 @@ namespace ImGui {
|
||||
lowerFreq = (centerFreq + viewOffset) - (viewBandwidth / 2.0);
|
||||
upperFreq = (centerFreq + viewOffset) + (viewBandwidth / 2.0);
|
||||
range = findBestRange(bandWidth, maxHSteps);
|
||||
updateWaterfallFb();
|
||||
if (_fullUpdate) { updateWaterfallFb(); };
|
||||
updateAllVFOs();
|
||||
}
|
||||
|
||||
@ -740,7 +740,7 @@ namespace ImGui {
|
||||
viewOffset = offset;
|
||||
lowerFreq = (centerFreq + viewOffset) - (viewBandwidth / 2.0);
|
||||
upperFreq = (centerFreq + viewOffset) + (viewBandwidth / 2.0);
|
||||
updateWaterfallFb();
|
||||
if (_fullUpdate) { updateWaterfallFb(); };
|
||||
updateAllVFOs();
|
||||
}
|
||||
|
||||
@ -766,13 +766,18 @@ namespace ImGui {
|
||||
return fftMax;
|
||||
}
|
||||
|
||||
void WaterFall::setFullWaterfallUpdate(bool fullUpdate) {
|
||||
std::lock_guard<std::mutex> lck(buf_mtx);
|
||||
_fullUpdate = fullUpdate;
|
||||
}
|
||||
|
||||
void WaterFall::setWaterfallMin(float min) {
|
||||
std::lock_guard<std::mutex> lck(buf_mtx);
|
||||
if (min == waterfallMin) {
|
||||
return;
|
||||
}
|
||||
waterfallMin = min;
|
||||
updateWaterfallFb();
|
||||
if (_fullUpdate) { updateWaterfallFb(); };
|
||||
}
|
||||
|
||||
float WaterFall::getWaterfallMin() {
|
||||
@ -785,7 +790,7 @@ namespace ImGui {
|
||||
return;
|
||||
}
|
||||
waterfallMax = max;
|
||||
updateWaterfallFb();
|
||||
if (_fullUpdate) { updateWaterfallFb(); };
|
||||
}
|
||||
|
||||
float WaterFall::getWaterfallMax() {
|
||||
|
@ -107,6 +107,8 @@ namespace ImGui {
|
||||
|
||||
void setFastFFT(bool fastFFT);
|
||||
|
||||
void setFullWaterfallUpdate(bool fullUpdate);
|
||||
|
||||
bool centerFreqMoved = false;
|
||||
bool vfoFreqChanged = false;
|
||||
bool bandplanEnabled = false;
|
||||
@ -207,5 +209,6 @@ namespace ImGui {
|
||||
bool bandplanVisible = false;
|
||||
|
||||
bool _fastFFT = true;
|
||||
bool _fullUpdate = true;
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user