Commit 4f6f4f91 authored by jeroen's avatar jeroen

Merge branch 'tammojan' into 'jeroen'

Some user interface improvements

See merge request !5
parents 8a0533ce 9aaa2baf
......@@ -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;
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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);
}
......
Markdown is supported
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