feat: upload to external services clublog qrz
This commit is contained in:
@@ -59,6 +59,20 @@ export function inferSpotMode(comment: string, freqHz: number): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
// spotModeCategory buckets the fine-grained mode from inferSpotMode into
|
||||
// the three families the cluster filter exposes: 'SSB' (phone: SSB/FM/AM),
|
||||
// 'CW', and 'DATA' (every digital mode). Returns '' when the mode is
|
||||
// unknown so callers can decide how to treat un-categorisable spots.
|
||||
export function spotModeCategory(mode: string): 'SSB' | 'CW' | 'DATA' | '' {
|
||||
const m = (mode || '').toUpperCase();
|
||||
if (m === '') return '';
|
||||
if (m === 'CW') return 'CW';
|
||||
if (m === 'SSB' || m === 'USB' || m === 'LSB' || m === 'FM' || m === 'AM') return 'SSB';
|
||||
// Everything else inferSpotMode can return (FT8/FT4/JS8/RTTY/PSK*/…/DATA)
|
||||
// is a digital mode.
|
||||
return 'DATA';
|
||||
}
|
||||
|
||||
// spotStatusKey is the cache key for ClusterSpotStatuses results. Must be
|
||||
// computed identically in the fetcher and every reader — including the
|
||||
// band map and the spot table — so a CW spot's status doesn't get looked
|
||||
|
||||
Reference in New Issue
Block a user