LibreVNADriver specific actions

This commit is contained in:
Jan Käberich 2023-01-25 23:07:33 +01:00
parent cde564299c
commit 80c5fc0ff6
34 changed files with 551 additions and 461 deletions

View file

@ -2,7 +2,6 @@
#include "unit.h"
#include "CustomWidgets/toggleswitch.h"
#include "Device/manualcontroldialog.h"
#include "Traces/tracemodel.h"
#include "tracewidgetsa.h"
#include "Traces/tracesmithchart.h"
@ -823,33 +822,6 @@ void SpectrumAnalyzer::ConfigureDevice()
if(running) {
changingSettings = true;
// TODO move into libreVNA driver
// if(settings.trackingGenerator && settings.freqStop >= 25000000) {
// // Check point spacing.
// // The highband PLL used as the tracking generator is not able to reach every frequency exactly. This
// // could lead to sharp drops in the spectrum at certain frequencies. If the span is wide enough with
// // respect to the point number, it is ensured that every displayed point has at least one sample with
// // a reachable PLL frequency in it. Display a warning message if this is not the case with the current
// // settings.
// auto pointSpacing = (settings.freqStop - settings.freqStart) / (settings.points - 1);
// // The frequency resolution of the PLL is frequency dependent (due to PLL divider).
// // This code assumes some knowledge of the actual hardware and probably should be moved
// // onto the device at some point
// double minSpacing = 25000;
// auto stop = settings.freqStop;
// while(stop <= 3000000000) {
// minSpacing /= 2;
// stop *= 2;
// }
// if(pointSpacing < minSpacing) {
// auto requiredMinSpan = minSpacing * (settings.points - 1);
// auto message = QString() + "Due to PLL limitations, the tracking generator can not reach every frequency exactly. "
// "With your current span, this could result in the signal not being detected at some bands. A minimum"
// " span of " + Unit::ToString(requiredMinSpan, "Hz", " kMG") + " is recommended at this stop frequency.";
// InformationBox::ShowMessage("Warning", message, "TrackingGeneratorSpanTooSmallWarning");
// }
// }
if(window->getDevice() && isActive) {
window->getDevice()->setSA(settings, [=](bool){
// device received command