From f02e4b97c487c980bc823f467e078a966f747bee Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 7 Oct 2016 18:19:48 +0200 Subject: Add ability to change RC settings from gui --- gui/odr-dabmux-gui.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'gui/odr-dabmux-gui.py') 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//', 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//', 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 """

Parameter is now {}

+

Return

""".format(value) + @route('/') def index(): conf.load() -- cgit v1.2.3