Push before merge

This commit is contained in:
Ryzerth
2020-10-22 02:33:50 +02:00
parent fbd7321b48
commit 087380c966
7 changed files with 24 additions and 10 deletions

View File

@ -26,6 +26,7 @@ public:
sigPath.init(name, 200000, 1000);
sigPath.start();
sigPath.setDemodulator(SigPath::DEMOD_FM, bandWidth);
sigPath.vfo->setSnapInterval(100000.0);
gui::menu.registerEntry(name, menuHandler, this);
ScriptManager::ScriptRunHandler_t handler;
@ -121,12 +122,19 @@ private:
_this->sigPath.setBandwidth(_this->bandWidth);
}
ImGui::Text("Squelch");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
ImGui::SliderFloat(CONCAT("##_squelch_select_", _this->name), &_this->sigPath.squelch.level, -100, 0);
ImGui::PopItemWidth();
ImGui::Text("Snap Interval");
ImGui::SameLine();
ImGui::SetNextItemWidth(menuColumnWidth - ImGui::GetCursorPosX());
if (ImGui::InputDouble(CONCAT("##_snap_select_", _this->name), &_this->snapInterval)) {
_this->sigPath.vfo->setSnapInterval(_this->snapInterval);
}
}
static void scriptCreateHandler(void* ctx, duk_context* dukCtx, duk_idx_t objId) {

View File

@ -36,7 +36,7 @@ void SigPath::init(std::string vfoName, uint64_t sampleRate, int blockSize) {
// TODO: Add a mono to stereo for different modes
squelch.init(vfo->output, 800);
squelch.level = 40;
squelch.level = -100.0;
squelch.onCount = 1;
squelch.offCount = 2560;

View File

@ -46,11 +46,12 @@ public:
dsp::FMDeemphasis deemp;
dsp::Squelch squelch;
VFOManager::VFO* vfo;
private:
static int sampleRateChangeHandler(void* ctx, double sampleRate);
VFOManager::VFO* vfo;
dsp::stream<dsp::complex_t> input;