MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / syncKiwiWaterfallSettings

Method syncKiwiWaterfallSettings

src/gui/SpectrumOverlayMenu.cpp:2091–2113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2089}
2090
2091void SpectrumOverlayMenu::syncKiwiWaterfallSettings(int cellDb, int floorDb,
2092 int rate)
2093{
2094 if (!m_gainSlider || !m_blackSlider || !m_rateSlider) {
2095 return;
2096 }
2097
2098 const int clampedCell = std::clamp(cellDb, -30, 30);
2099 const int clampedFloor = std::clamp(floorDb, -30, 30);
2100 const int clampedRate = std::clamp(rate, 0, kKiwiSdrWaterfallRateMax);
2101 QSignalBlocker b1(m_gainSlider), b2(m_blackSlider),
2102 b3(m_rateSlider), b4(m_autoBlackBtn);
2103
2104 setKiwiWaterfallControlMode(true);
2105
2106 m_gainSlider->setValue(clampedCell);
2107 m_gainLabel->setText(kiwiWaterfallDbText(clampedCell));
2108 m_blackSlider->setValue(clampedFloor);
2109 m_blackLabel->setText(kiwiWaterfallDbText(clampedFloor));
2110 m_autoBlackBtn->setChecked(clampedFloor == 0);
2111 m_rateSlider->setValue(clampedRate);
2112 m_rateLabel->setText(kiwiWaterfallRateText(clampedRate));
2113}
2114
2115void SpectrumOverlayMenu::syncNoiseFloorPosition(int pos)
2116{

Callers 1

Calls 3

kiwiWaterfallDbTextFunction · 0.85
kiwiWaterfallRateTextFunction · 0.85
setValueMethod · 0.45

Tested by

no test coverage detected