Browse Source

Display 'override' or 'normal' in override status. (mech.html)

jeroen 2016-04-02
Jeroen Vreeken 6 years ago
parent
commit
628a06cf86
2 changed files with 7 additions and 1 deletions
  1. +4
    -0
      console/htdocs/mech.html
  2. +3
    -1
      console/js/dt_ui.js

+ 4
- 0
console/htdocs/mech.html View File

@ -105,6 +105,8 @@ var azimuth_software = new dt_ui_window_trace("azimuth_software", "Azimuth Softw
name: "Azimuth_Override",
frequency: 0,
label: "Override",
true_text: "Override",
false_text: "Normal",
func: one,
is_bool: true,
true_color: "orange",
@ -183,6 +185,8 @@ var elevation_software = new dt_ui_window_trace("elevation_software", "Elevation
name: "Elevation_Override",
frequency: 0,
label: "Override",
true_text: "Override",
false_text: "Normal",
func: one,
is_bool: true,
true_color: "orange",


+ 3
- 1
console/js/dt_ui.js View File

@ -861,7 +861,9 @@ function dt_ui_window_trace(elementid, name, traces)
this.traces_ui[i].number_set(traces[i].is_number, traces[i].decimals);
var true_color = traces[i].true_color ? traces[i].true_color : "lightgreen";
var false_color = traces[i].false_color ? traces[i].false_color : "red";
this.traces_ui[i].bool_set(traces[i].is_bool, traces[i].label, traces[i].label, true_color, false_color);
var true_text = traces[i].true_text ? traces[i].true_text : traces[i].label;
var false_text = traces[i].false_text ? traces[i].false_text : traces[i].label;
this.traces_ui[i].bool_set(traces[i].is_bool, true_text, false_text, true_color, false_color);
if (!traces[i].is_bool) {
this.traces_ui[i].suffix_set(traces[i].suffix);
this.traces_ui[i].label_set(traces[i].label);


Loading…
Cancel
Save