From fb17763e266d8cea1569d3e51404b3e62835f7f4 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 12 Dec 2018 09:16:25 +0100 Subject: GUI: Try to get RC params working again --- python/gui/static/js/odr-rcvalues.js | 23 ++++++++++++++--------- python/gui/templates/predistortion.html | 10 +++++++--- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/python/gui/static/js/odr-rcvalues.js b/python/gui/static/js/odr-rcvalues.js index f49674c..a3a5e07 100644 --- a/python/gui/static/js/odr-rcvalues.js +++ b/python/gui/static/js/odr-rcvalues.js @@ -31,18 +31,21 @@ function requestStatus() { doApiRequestGET("/api/rc_parameters", function(data) { console.log(data); - let keys = Object.keys(data); - keys.sort(); + let controllable_names = Object.keys(data); + controllable_names.sort(); var key1; - for (key1 in keys) { - let keys2 = Object.keys(data[keys[key1]]); - keys2.sort(); + for (key1 in controllable_names) { + let param_names = Object.keys(data[controllable_names[key1]]); + param_names.sort(); var key2; - for (key2 in keys2) { - var param = data[keys[key1]][keys2[key2]]; - var key = keys[key1] + "_" + keys2[key2]; + for (key2 in param_names) { + var name_controllable = controllable_names[key1]; + var name_param = param_names[key2]; + var key = name_controllable + "_" + name_param; + + var param = data[name_controllable][name_param]; var valueentry = '' + '