Compare commits
No commits in common. "1b8c97f5e7b30830e37f2dd84991a8b620f02861" and "fd29ec745efaf1e4554fbe20c9d80c4c7d604a0c" have entirely different histories.
1b8c97f5e7
...
fd29ec745e
25
spot.go
25
spot.go
@ -134,61 +134,60 @@ func ProcessTelnetSpot(re *regexp.Regexp, spotRaw string, SpotChanToFlex chan Te
|
||||
}
|
||||
|
||||
func (spot *TelnetSpot) GetBand() {
|
||||
freq := FreqMhztoHz(spot.Frequency)
|
||||
switch true {
|
||||
case strings.HasPrefix(freq, "1.8"):
|
||||
case strings.HasPrefix(spot.Frequency, "1.8"):
|
||||
spot.Band = "160M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "LSB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "3."):
|
||||
case strings.HasPrefix(spot.Frequency, "3"):
|
||||
spot.Band = "80M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "LSB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "5."):
|
||||
case strings.HasPrefix(spot.Frequency, "5."):
|
||||
spot.Band = "60M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "LSB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "7."):
|
||||
case strings.HasPrefix(spot.Frequency, "7"):
|
||||
spot.Band = "40M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "LSB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "10."):
|
||||
case strings.HasPrefix(spot.Frequency, "10"):
|
||||
spot.Band = "30M"
|
||||
case strings.HasPrefix(freq, "14."):
|
||||
case strings.HasPrefix(spot.Frequency, "14"):
|
||||
spot.Band = "20M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "18."):
|
||||
case strings.HasPrefix(spot.Frequency, "18"):
|
||||
spot.Band = "17M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "21."):
|
||||
case strings.HasPrefix(spot.Frequency, "21"):
|
||||
spot.Band = "15M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "24."):
|
||||
case strings.HasPrefix(spot.Frequency, "24"):
|
||||
spot.Band = "12M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "28."):
|
||||
case strings.HasPrefix(spot.Frequency, "28"):
|
||||
spot.Band = "10M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "29."):
|
||||
case strings.HasPrefix(spot.Frequency, "29"):
|
||||
spot.Band = "10M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
}
|
||||
case strings.HasPrefix(freq, "50."):
|
||||
case strings.HasPrefix(spot.Frequency, "50"):
|
||||
spot.Band = "6M"
|
||||
if spot.Mode == "SSB" {
|
||||
spot.Mode = "USB"
|
||||
|
Loading…
x
Reference in New Issue
Block a user