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

Function resolveBandStackKey

src/models/XvtrPolicy.cpp:68–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66} // namespace
67
68BandStackKeyResult resolveBandStackKey(const QString& bandName,
69 const QVector<Transverter>& xvtrs,
70 ModelCapabilities caps)
71{
72 static const QMap<QString, int> kNumericBandSlots = {
73 { QStringLiteral("WWV"), 33 },
74 { QStringLiteral("GEN"), 34 },
75 };
76
77 const QString radioKey = normalizedNativeBandKey(bandName, caps);
78 if (isNativeBandKey(radioKey, caps))
79 return {radioKey, {}};
80
81 if (kNumericBandSlots.contains(bandName))
82 return {QString::number(kNumericBandSlots.value(bandName)), {}};
83
84 for (const auto& xvtr : xvtrs) {
85 if (!xvtr.isValid || xvtr.name != bandName)
86 continue;
87
88 return {QString("X%1").arg(xvtr.index), {}};
89 }
90
91 return {
92 {},
93 QString("Band %1 has no Flex display pan band= mapping").arg(bandName)
94 };
95}
96
97bool isWaterfallTileOutsidePan(double lowMhz, double highMhz, double panCenterMhz)
98{

Callers 5

activateMemorySpotMethod · 0.85
wirePanadapterMethod · 0.85
expectBandKeyFunction · 0.85
expectUnsupportedBandFunction · 0.85

Calls 4

normalizedNativeBandKeyFunction · 0.85
isNativeBandKeyFunction · 0.85
containsMethod · 0.80
valueMethod · 0.45

Tested by 2

expectBandKeyFunction · 0.68
expectUnsupportedBandFunction · 0.68