waterfall config fine-adjustments

* hide the waterfall colors input when pre-defined color scheme is
  selected
* skip unparseable lines on custom color input
* fallback to black and white if custom color config is unusable
* always use the waterfall classes when sending changes to the client
This commit is contained in:
Jakob Ketterl
2021-02-16 18:35:18 +01:00
parent 9aebeb51f8
commit 691d88f841
6 changed files with 30 additions and 8 deletions

View File

@ -207,8 +207,8 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
def writeConfig(changes):
# TODO it would be nicer to have all options available and switchable in the client
# this restores the existing functionality for now, but there is lots of potential
if "waterfall_scheme" in changes:
scheme = WaterfallOptions(changes["waterfall_scheme"]).instantiate()
if "waterfall_scheme" in changes or "waterfall_colors" in changes:
scheme = WaterfallOptions(globalConfig["waterfall_scheme"]).instantiate()
changes["waterfall_colors"] = scheme.getColors()
self.write_config(changes)