Commit 05ad54b9 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Add error to status

parent b194d009
...@@ -62,6 +62,8 @@ function dt_status(element_name) { ...@@ -62,6 +62,8 @@ function dt_status(element_name) {
this.button_el_enable = new dt_ui_button(element_name + "_el_enable"); this.button_el_enable = new dt_ui_button(element_name + "_el_enable");
this.button_disable = new dt_ui_button(element_name + "_disable"); this.button_disable = new dt_ui_button(element_name + "_disable");
this.val_az_sp = new dt_ui_value_trace(element_name + "_val_az_sp", "Azimuth_Setpoint_Error", 4);
this.val_el_sp = new dt_ui_value_trace(element_name + "_val_el_sp", "Elevation_Setpoint_Error", 4);
this.val_az_north = new dt_ui_value(element_name + "_val_az_north"); this.val_az_north = new dt_ui_value(element_name + "_val_az_north");
this.window.add([ this.window.add([
...@@ -72,7 +74,7 @@ function dt_status(element_name) { ...@@ -72,7 +74,7 @@ function dt_status(element_name) {
this.az_view, this.el_view, this.az_view, this.el_view,
this.button_fb_p, this.button_fb_m, this.button_fb_p, this.button_fb_m,
this.button_az_enable, this.button_el_enable, this.button_disable, this.button_az_enable, this.button_el_enable, this.button_disable,
this.val_az_north]); this.val_az_sp, this.val_el_sp, this.val_az_north]);
this.lbl_az.text_set("Azimuth"); this.lbl_az.text_set("Azimuth");
this.lbl_el.text_set("Elevation"); this.lbl_el.text_set("Elevation");
...@@ -85,8 +87,12 @@ function dt_status(element_name) { ...@@ -85,8 +87,12 @@ function dt_status(element_name) {
this.val_el_pos.suffix_set("°"); this.val_el_pos.suffix_set("°");
this.val_fb_pos.suffix_set("mm"); this.val_fb_pos.suffix_set("mm");
this.val_t.suffix_set("UTC"); this.val_t.suffix_set("UTC");
this.val_az_sp.label_set("Error");
this.val_el_sp.label_set("Error");
this.val_az_north.label_set("North"); this.val_az_north.label_set("North");
this.val_az_north.suffix_set("°"); this.val_az_north.suffix_set("°");
this.val_az_sp.suffix_set("°");
this.val_el_sp.suffix_set("°");
this.button_fb_p.text_set("+"); this.button_fb_p.text_set("+");
this.button_fb_m.text_set("-"); this.button_fb_m.text_set("-");
...@@ -106,6 +112,8 @@ function dt_status(element_name) { ...@@ -106,6 +112,8 @@ function dt_status(element_name) {
this.window.resize_equal([ this.window.resize_equal([
this.val_az_en, this.val_az_safe, this.val_az_en, this.val_az_safe,
this.val_el_en, this.val_el_safe]); this.val_el_en, this.val_el_safe]);
this.window.resize_equal([
this.val_az_sp, this.val_el_sp, this.val_az_north]);
this.window.resize_equal([this.button_fb_p, this.button_fb_m]); this.window.resize_equal([this.button_fb_p, this.button_fb_m]);
...@@ -135,14 +143,15 @@ function dt_status(element_name) { ...@@ -135,14 +143,15 @@ function dt_status(element_name) {
this.view_azimuth = new azimuth_view(this.az_view.name); this.view_azimuth = new azimuth_view(this.az_view.name);
this.view_elevation = new elevation_view(this.el_view.name); this.view_elevation = new elevation_view(this.el_view.name);
this.window.resize_equal([this.val_az_north]);
this.window.align_horizontal([ this.window.align_horizontal([
this.button_az_enable, this.el_view, this.az_view, this.val_az_north], 5); this.button_az_enable, this.el_view, this.az_view, this.val_az_sp], 5);
this.window.align_vertical([ this.window.align_vertical([
this.button_az_enable, this.button_el_enable, this.button_disable], 5); this.button_az_enable, this.button_el_enable, this.button_disable], 5);
this.window.align_vertical([
this.val_az_sp, this.val_el_sp, this.val_az_north], 5);
this.val_fb_pos.value_func = function(value) { this.val_fb_pos.value_func = function(value) {
...@@ -210,6 +219,13 @@ function dt_status(element_name) { ...@@ -210,6 +219,13 @@ function dt_status(element_name) {
this.val_el_pos.number_set(true, 4); this.val_el_pos.number_set(true, 4);
this.val_el_pos.highlight_set(true, "yellow", "white"); this.val_el_pos.highlight_set(true, "yellow", "white");
this.val_az_sp.value_func = rad2deg;
this.val_az_sp.number_set(true, 4);
this.val_az_sp.highlight_set(true, "yellow", "white");
this.val_el_sp.value_func = rad2deg;
this.val_el_sp.number_set(true, 4);
this.val_el_sp.highlight_set(true, "yellow", "white");
this.el_setpoint_trace = new trace(); this.el_setpoint_trace = new trace();
this.el_setpoint_trace.timeout = 3000; this.el_setpoint_trace.timeout = 3000;
......
...@@ -180,11 +180,11 @@ err_add: ...@@ -180,11 +180,11 @@ err_add:
err_init: err_init:
free(bus); free(bus);
err_bus: err_bus:
free(ec_tx); ec_tx->private = NULL;
controller_block_free(ec_tx);
err_outputs: err_outputs:
err_ec_tx: err_ec_tx:
free(ec->private); controller_block_free(ec);
free(ec);
err_ec: err_ec:
return NULL; return NULL;
} }
......
...@@ -770,15 +770,13 @@ err_tx_input: ...@@ -770,15 +770,13 @@ err_tx_input:
err_rx_output: err_rx_output:
/* no way to un-init the device? */ /* no way to un-init the device? */
err_stoeber_init: err_stoeber_init:
// free(stoeber_rx->name); stoeber_rx->private = NULL;
// free(stoeber_rx); controller_block_free(stoeber_rx);
err_malloc_rx: err_malloc_rx:
// free(stoeber_tx->name); stoeber_tx->private = NULL;
// free(stoeber_tx); controller_block_free(stoeber_tx);
err_malloc_tx: err_malloc_tx:
// free(stoeber->private); controller_block_free(stoeber);
// free(stoeber->name);
// free(stoeber);
err_malloc: err_malloc:
return NULL; return NULL;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment