Change for frequencyToBand returning null based on commit cdb41c16a6a2d6b274bea0947a3d3498742861a8

This commit is contained in:
HB9HIL
2025-11-15 21:44:30 +01:00
parent d38c7da0cc
commit 89e90c6170

View File

@@ -2970,7 +2970,7 @@ var dxWaterfall = {
var middleFreq = this.getCachedMiddleFreq();
// Use 20kHz margin for band detection (extends band edges)
bandToUse = frequencyToBandKhz(middleFreq, 20);
if (bandToUse === 'All') {
if (!bandToUse) {
return null; // Out of band and no spots loaded
}
}
@@ -3055,7 +3055,7 @@ var dxWaterfall = {
} else {
// Use 20kHz margin for band detection (extends band edges)
bandToDraw = frequencyToBandKhz(middleFreq, 20);
if (bandToDraw === 'All') {
if (!bandToDraw) {
return; // Out of band and no spots loaded, don't draw
}
}
@@ -5184,7 +5184,7 @@ var dxWaterfall = {
// Check if we're out of band (using 20kHz margin)
var currentFreqKhz = this.getCachedMiddleFreq();
var detectedBand = frequencyToBandKhz(currentFreqKhz, 20);
var isOutOfBand = (detectedBand === 'All');
var isOutOfBand = (!detectedBand);
if (isOutOfBand && (!this.currentSpotBand || this.currentSpotBand === 'All')) {
// Out of band with no spots loaded - show "Out of band" message