1
0
Fork 0

Sébastien MARQUE:

The zkv500 is now repaired (see attached patch) at least for turnpoint mode.
I'm quite sure there will have problem some problems with route management,
I haven't tested yet, but I'll do this week-end.

I've also fixed the screen refresh frequency, which is now more regular.
This commit is contained in:
curt 2009-10-30 18:39:12 +00:00
parent 1dc70c33b9
commit 1f00dadc43
3 changed files with 12 additions and 7 deletions

View file

@ -217,7 +217,7 @@ var screenNavigationMain = {
},
lines : func {
me.waypoint = gps_wp.getNode("wp[1]");
crs_deviation = gps_wp.getNode("leg-course-deviation-deg").getValue();
crs_deviation = me.waypoint.getNode("course-deviation-deg").getValue();
if (crs_deviation > 5)
me.graph = "[- - - - - ^ > > > > >]";
elsif (crs_deviation < -5)
@ -236,8 +236,8 @@ var screenNavigationMain = {
me.waypoint.getNode("distance-nm",1).getValue() * dist_conv[0][dist_unit],
dist_unit_short_name[dist_unit]),
sprintf("XCRS: %d* (%.1f %s)",
gps_wp.getNode("leg-course-deviation-deg").getValue(),
gps_wp.getNode("leg-course-error-nm").getValue() * dist_conv[0][dist_unit],
me.waypoint.getNode("course-deviation-deg").getValue(),
me.waypoint.getNode("course-error-nm").getValue() * dist_conv[0][dist_unit],
dist_unit_short_name[dist_unit]),
sprintf("TTW: %s",
me.waypoint.getNode("TTW").getValue()),

View file

@ -29,9 +29,9 @@ var screenTurnpointSelect = {
gps_wp.getNode("wp[1]/altitude-ft",1).setValue(bookmark.getNode("altitude-ft").getValue());
gps_wp.getNode("wp[1]/ID").setValue(bookmark.getNode("ID").getValue());
if (bookmark.getNode("name") != nil)
gps_wp.getNode("wp[1]/name").setValue(bookmark.getNode("name").getValue());
gps_wp.getNode("wp[1]/name",1).setValue(bookmark.getNode("name").getValue());
if (bookmark.getNode("waypoint-type") != nil)
gps_wp.getNode("wp[1]/waypoint-type").setValue(bookmark.getNode("waypoint-type").getValue());
gps_wp.getNode("wp[1]/waypoint-type",1).setValue(bookmark.getNode("waypoint-type").getValue());
blocked = 0;
me.loaded = 1;
page = 1;

View file

@ -3,6 +3,7 @@ var displayed_screen = 0; #screenModeAndSettings
var page = 0; #current page
var blocked = 0; #boolean: 0 -> possible to cycle pages
var isOn = 0; #ON/OFF: 0 -> OFF
var refresh_timer = 0; #avoid multiple settimers
var freq = 1; #settimer frequency (in sec)
var screen = []; #array containing all screens
var line = []; #array containing the displayed lines
@ -137,9 +138,13 @@ var cycle = func (entries_nbr, actual_entrie, dir) {
else return actual_entrie + dir;
}
var refresh_display = func() { #refresh displayed lines, settimer if necessary
var refresh_display = func(forced = 1) { #refresh displayed lines, settimer if necessary
if (!forced) refresh_timer -= 1;
screen[displayed_screen].lines();
if (isOn and 0 < displayed_screen < 5 ) settimer(func { refresh_display(); }, freq, 1);
if (isOn and 0 < displayed_screen and displayed_screen < 5 and !refresh_timer) {
refresh_timer += 1;
settimer(func { refresh_display(0); }, freq, 1);
}
}
var seconds_to_string = func (time) { #converts secs (double) in string "hh:mm:ss"