diff options
Diffstat (limited to 'gui/odr-dabmux-gui.py')
-rwxr-xr-x | gui/odr-dabmux-gui.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gui/odr-dabmux-gui.py b/gui/odr-dabmux-gui.py index 7e3cb3e..2f028e4 100755 --- a/gui/odr-dabmux-gui.py +++ b/gui/odr-dabmux-gui.py @@ -78,6 +78,28 @@ def config_json_get(): 'config': conf.get_full_configuration() } +@route('/rc/<module>/<param>', method="GET") +def rc_get(module, param): + rc.load() + + value = rc.get_param_value(module, param) + + return template('rcparam', + module = module, + param = param, + value = value) + +@route('/rc/<module>/<param>', method="POST") +def rc_post(module, param): + value = request.forms.get('newvalue') + + rc.set_param_value(module, param, value) + + value = rc.get_param_value(module, param) + + return """<p>Parameter is now {}</p> +<p><a href="/#rcmodules">Return</a></p>""".format(value) + @route('/') def index(): conf.load() |