Browse Source

Merge branch 'tammojan' into 'jeroen'

Some user interface improvements

See merge request dijkema/dt_ctrl!5
jeroen
jeroen 4 years ago
parent
commit
4f6f4f915c
4 changed files with 35 additions and 12 deletions
  1. +5
    -1
      console/console/console_j2000tracker.c
  2. +1
    -0
      console/console/start_console.sh
  3. +14
    -10
      console/js/dt_status.js
  4. +15
    -1
      console/js/offset.js

+ 5
- 1
console/console/console_j2000tracker.c View File

@ -136,7 +136,11 @@ void a2coord(char *ara, char *adec, struct ln_hms *ra, struct ln_dms *dec)
i = 1;
} else {
dec->neg = 0;
i = 0;
if (strlen(adec) && adec[0] =='+') {
i = 1;
} else {
i = 0;
}
}
dec->degrees = 0;
dec->minutes = 0;


+ 1
- 0
console/console/start_console.sh View File

@ -24,6 +24,7 @@ screen -S console -X screen -t console_sattracker console_sattracker
screen -S console -X screen -t console_weather console_weather
screen -S console -X screen -t console_httpd console_httpd
screen -S console -X screen -t console_trace2port ../../common/trace/trace2port -d localhost Azimuth_Position Elevation_Position azimuth_setpoint_error.difference elevation_setpoint_error.difference Azimuth_Speed Elevation_Speed_Right Focusbox_Position
screen -S console -X screen -t trace_az_pos ../../common/trace/trace2file localhost 10000 Azimuth_Position /var/log/dt/traces/Azimuth_Position.trace 15000 100000 5
screen -S console -X screen -t trace_az_pos ../../common/trace/trace2file localhost 10000 Elevation_Position /var/log/dt/traces/Elevation_Position.trace 15000 100000 5


+ 14
- 10
console/js/dt_status.js View File

@ -289,19 +289,23 @@ function dt_status(element_name) {
this.fb_plus_command = new controller_command("focusbox_plus", "bool");
this.fb_min_command = new controller_command("focusbox_min", "bool");
this.button_fb_p.onmousedown = function() {
this.button_fb_p.element.addEventListener("mousedown", function() {
dt_status_this.fb_plus_command.send(1);
}
this.button_fb_p.onmouseup = function() {
dt_status_this.fb_plus_command.send(0);
}
});
function fb_p_disable(e) {
dt_status_this.fb_plus_command.send(0);
}
this.button_fb_p.element.addEventListener("mouseup", fb_p_disable);
this.button_fb_p.element.addEventListener("mouseout", fb_p_disable);
this.button_fb_m.onmousedown = function() {
this.button_fb_m.element.addEventListener("mousedown", function() {
dt_status_this.fb_min_command.send(1);
}
this.button_fb_m.onmouseup = function() {
dt_status_this.fb_min_command.send(0);
}
});
function fb_m_disable(e) {
dt_status_this.fb_min_command.send(0);
}
this.button_fb_m.element.addEventListener("mouseup", fb_m_disable);
this.button_fb_m.element.addEventListener("mouseout", fb_m_disable);
}


+ 15
- 1
console/js/offset.js View File

@ -142,17 +142,31 @@ function offset(element_name) {
*/
this.highlight_title = function(az, el)
{
if (az!=0 || el!=0)
{
this.window.title.element.style.background = 'yellow';
}
else
{
this.window.title.element.style.background = 'silver';
}
}
this.set_offset = function(az, el)
{
this.val_az.value_set(decimals(rad2deg(az), 4));
this.val_el.value_set(decimals(rad2deg(el), 4));
this.highlight_title(az, el);
}
this.send = function(az, el)
{
az = deg2rad(floatval(az));
el = deg2rad(floatval(el));
this.highlight_title(az, el);
dt_websocket_send("command offset" + " " + az + " " + el);
}


Loading…
Cancel
Save