mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Remove colours from API #7
This commit is contained in:
@@ -12,23 +12,23 @@ ALL_MODES = CW_MODES + PHONE_MODES + DATA_MODES
|
|||||||
|
|
||||||
# Band definitions
|
# Band definitions
|
||||||
BANDS = [
|
BANDS = [
|
||||||
Band(name="160m", start_freq=1800, end_freq=2000, color="#7cfc00", contrast_color="black"),
|
Band(name="160m", start_freq=1800, end_freq=2000),
|
||||||
Band(name="80m", start_freq=3500, end_freq=4000, color="#e550e5", contrast_color="black"),
|
Band(name="80m", start_freq=3500, end_freq=4000),
|
||||||
Band(name="60m", start_freq=5250, end_freq=5410, color="#00008b", contrast_color="white"),
|
Band(name="60m", start_freq=5250, end_freq=5410),
|
||||||
Band(name="40m", start_freq=7000, end_freq=7300, color="#5959ff", contrast_color="white"),
|
Band(name="40m", start_freq=7000, end_freq=7300),
|
||||||
Band(name="30m", start_freq=10100, end_freq=10150, color="#62d962", contrast_color="black"),
|
Band(name="30m", start_freq=10100, end_freq=10150),
|
||||||
Band(name="20m", start_freq=14000, end_freq=14350, color="#f2c40c", contrast_color="black"),
|
Band(name="20m", start_freq=14000, end_freq=14350),
|
||||||
Band(name="17m", start_freq=18068, end_freq=18168, color="#f2f261", contrast_color="black"),
|
Band(name="17m", start_freq=18068, end_freq=18168),
|
||||||
Band(name="15m", start_freq=21000, end_freq=21450, color="#cca166", contrast_color="black"),
|
Band(name="15m", start_freq=21000, end_freq=21450),
|
||||||
Band(name="12m", start_freq=24890, end_freq=24990, color="#b22222", contrast_color="white"),
|
Band(name="12m", start_freq=24890, end_freq=24990),
|
||||||
Band(name="10m", start_freq=28000, end_freq=29700, color="#ff69b4", contrast_color="black"),
|
Band(name="10m", start_freq=28000, end_freq=29700),
|
||||||
Band(name="6m", start_freq=50000, end_freq=54000, color="#FF0000", contrast_color="white"),
|
Band(name="6m", start_freq=50000, end_freq=54000),
|
||||||
Band(name="4m", start_freq=70000, end_freq=70500, color="#cc0044", contrast_color="white"),
|
Band(name="4m", start_freq=70000, end_freq=70500),
|
||||||
Band(name="2m", start_freq=144000, end_freq=148000, color="#FF1493", contrast_color="black"),
|
Band(name="2m", start_freq=144000, end_freq=148000),
|
||||||
Band(name="70cm", start_freq=420000, end_freq=450000, color="#999900", contrast_color="white"),
|
Band(name="70cm", start_freq=420000, end_freq=450000),
|
||||||
Band(name="23cm", start_freq=1240000, end_freq=1325000, color="#5AB8C7", contrast_color="black"),
|
Band(name="23cm", start_freq=1240000, end_freq=1325000),
|
||||||
Band(name="13cm", start_freq=2300000, end_freq=2450000, color="#FF7F50", contrast_color="black")]
|
Band(name="13cm", start_freq=2300000, end_freq=2450000)]
|
||||||
UNKNOWN_BAND = Band(name="Unknown", start_freq=0, end_freq=0, color="black", contrast_color="white")
|
UNKNOWN_BAND = Band(name="Unknown", start_freq=0, end_freq=0)
|
||||||
|
|
||||||
# DXCC flags (borrowed from https:#github.com/wavelog/wavelog/blob/master/application/libraries/DxccFlag.php)
|
# DXCC flags (borrowed from https:#github.com/wavelog/wavelog/blob/master/application/libraries/DxccFlag.php)
|
||||||
DXCC_FLAGS = {
|
DXCC_FLAGS = {
|
||||||
|
|||||||
@@ -9,7 +9,3 @@ class Band:
|
|||||||
start_freq: float
|
start_freq: float
|
||||||
# Stop frequency, in kHz
|
# Stop frequency, in kHz
|
||||||
end_freq: float
|
end_freq: float
|
||||||
# Colour to use for this band, as per PSK Reporter
|
|
||||||
color: str
|
|
||||||
# Contrast colour to use for text against a background of the band colour
|
|
||||||
contrast_color: str
|
|
||||||
@@ -55,10 +55,6 @@ class Spot:
|
|||||||
freq: float = None
|
freq: float = None
|
||||||
# Band, defined by the frequency, e.g. "40m" or "70cm"
|
# Band, defined by the frequency, e.g. "40m" or "70cm"
|
||||||
band: str = None
|
band: str = None
|
||||||
# Colour to use for the band
|
|
||||||
band_color: str = None
|
|
||||||
# Contrast colour to use for text on a background of band_color
|
|
||||||
band_contrast_color: str = None
|
|
||||||
# Time of the spot
|
# Time of the spot
|
||||||
time: datetime = None
|
time: datetime = None
|
||||||
# Time that this software received the spot. This is used with the "since_received" call to our API to receive all
|
# Time that this software received the spot. This is used with the "since_received" call to our API to receive all
|
||||||
@@ -121,8 +117,6 @@ class Spot:
|
|||||||
if self.freq and not self.band:
|
if self.freq and not self.band:
|
||||||
band = infer_band_from_freq(self.freq)
|
band = infer_band_from_freq(self.freq)
|
||||||
self.band = band.name
|
self.band = band.name
|
||||||
self.band_color = band.color
|
|
||||||
self.band_contrast_color = band.contrast_color
|
|
||||||
|
|
||||||
# Mode from comments, mode family from mode
|
# Mode from comments, mode family from mode
|
||||||
if self.comment and not self.mode:
|
if self.comment and not self.mode:
|
||||||
|
|||||||
@@ -362,14 +362,6 @@ components:
|
|||||||
- 13cm
|
- 13cm
|
||||||
- Unknown
|
- Unknown
|
||||||
example: 40m
|
example: 40m
|
||||||
band_color:
|
|
||||||
type: string
|
|
||||||
description: Colour to use for the band
|
|
||||||
example: "#aaaaff"
|
|
||||||
band_contrast_color:
|
|
||||||
type: string
|
|
||||||
description: Contrast colour to use for text on a background of band_color
|
|
||||||
example: black
|
|
||||||
time:
|
time:
|
||||||
type: string
|
type: string
|
||||||
description: Time of the spot, ISO 8601 format
|
description: Time of the spot, ISO 8601 format
|
||||||
|
|||||||
Reference in New Issue
Block a user