change display precision behavior to reference Hertz
This commit is contained in:
@@ -2,7 +2,7 @@ from owrx.property import PropertyLayer
|
||||
|
||||
|
||||
defaultConfig = PropertyLayer(
|
||||
version=5,
|
||||
version=6,
|
||||
max_clients=20,
|
||||
receiver_name="[Callsign]",
|
||||
receiver_location="Budapest, Hungary",
|
||||
@@ -25,7 +25,7 @@ defaultConfig = PropertyLayer(
|
||||
waterfall_scheme="GoogleTurboWaterfall",
|
||||
waterfall_levels=PropertyLayer(min=-88, max=-20),
|
||||
waterfall_auto_level_margin=PropertyLayer(min=3, max=10, min_range=50),
|
||||
frequency_display_precision=4,
|
||||
tuning_precision=2,
|
||||
squelch_auto_margin=10,
|
||||
nmux_memory=50,
|
||||
google_maps_api_key="",
|
||||
|
@@ -89,13 +89,23 @@ class ConfigMigratorVersion4(ConfigMigrator):
|
||||
config["version"] = 5
|
||||
|
||||
|
||||
class ConfigMigratorVersion5(ConfigMigrator):
|
||||
def migrate(self, config):
|
||||
if "frequency_display_precision" in config:
|
||||
# old config was always in relation to the display in MHz (1e6 Hz, hence the 6)
|
||||
config["tuning_precision"] = 6 - config["frequency_display_precision"]
|
||||
del config["frequency_display_precision"]
|
||||
config["version"] = 6
|
||||
|
||||
|
||||
class Migrator(object):
|
||||
currentVersion = 5
|
||||
currentVersion = 6
|
||||
migrators = {
|
||||
1: ConfigMigratorVersion1(),
|
||||
2: ConfigMigratorVersion2(),
|
||||
3: ConfigMigratorVersion3(),
|
||||
4: ConfigMigratorVersion4(),
|
||||
5: ConfigMigratorVersion5(),
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
|
Reference in New Issue
Block a user