More fixes.

This commit is contained in:
Marat Fayzullin 2024-01-29 22:29:43 -05:00
parent 87f6e7ddda
commit ce9da8d003
2 changed files with 6 additions and 4 deletions

View File

@ -175,7 +175,7 @@ class Markers(object):
# Update station markers that have transmissions # Update station markers that have transmissions
for key in tx.keys(): for key in tx.keys():
r = tx[key] r = tx[key]
map.updateLocation(r.getId(), r, r.getMode(), permanent) map.updateLocation(r.getId(), r, r.getMode(), timestamp=permanent)
self.txmarkers[key] = r self.txmarkers[key] = r
# Done with the schedule # Done with the schedule
@ -200,7 +200,7 @@ class Markers(object):
# Update receiver markers that are online # Update receiver markers that are online
for key in rx.keys(): for key in rx.keys():
r = rx[key] r = rx[key]
map.updateLocation(r.getId(), r, r.getMode(), permanent) map.updateLocation(r.getId(), r, r.getMode(), timestamp=permanent)
self.rxmarkers[key] = r self.rxmarkers[key] = r
# Done updating receivers # Done updating receivers
norx = None norx = None
@ -244,8 +244,10 @@ class Markers(object):
# Update given markers on the map # Update given markers on the map
def updateMap(self, markers): def updateMap(self, markers):
# Create a timestamp far into the future, for permanent markers
permanent = datetime.utcnow() + timedelta(weeks=500)
for r in markers.values(): for r in markers.values():
Map.getSharedInstance().updateLocation(r.getId(), r, r.getMode(), permanent) Map.getSharedInstance().updateLocation(r.getId(), r, r.getMode(), timestamp=permanent)
# Scrape online databases, updating cache file # Scrape online databases, updating cache file
def updateCache(self): def updateCache(self):

View File

@ -15,7 +15,7 @@ from owrx.property.filter import ByLambda
from owrx.form.input import Input, TextInput, NumberInput, CheckboxInput, ModesInput, ExponentialInput, DropdownInput, Option from owrx.form.input import Input, TextInput, NumberInput, CheckboxInput, ModesInput, ExponentialInput, DropdownInput, Option
from owrx.form.input.converter import Converter, OptionalConverter, IntConverter from owrx.form.input.converter import Converter, OptionalConverter, IntConverter
from owrx.form.input.device import GainInput, SchedulerInput, WaterfallLevelsInput from owrx.form.input.device import GainInput, SchedulerInput, WaterfallLevelsInput
from owrx.form.input.validator import RequiredValidator, Range, RangeListValidator from owrx.form.input.validator import RequiredValidator, Range, RangeValidator, RangeListValidator
from owrx.form.section import OptionalSection from owrx.form.section import OptionalSection
from owrx.feature import FeatureDetector from owrx.feature import FeatureDetector
from owrx.log import LogPipe, HistoryHandler from owrx.log import LogPipe, HistoryHandler