From 4f449a8d44b41823a463550db90d10e897ce3257 Mon Sep 17 00:00:00 2001 From: Malcolm Robb Date: Thu, 2 Oct 2014 21:08:57 +0100 Subject: [PATCH 1/2] Make Pull # compatible with Pull #42 --- mode_s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mode_s.c b/mode_s.c index 4d470bd..03aa58f 100644 --- a/mode_s.c +++ b/mode_s.c @@ -2052,7 +2052,8 @@ int decodeCPR(struct aircraft *a, int fflag, int surface) { } // Check to see that the latitude is in range: -90 .. +90 - if (rlat0 < -90 || rlat0 > 90 || rlat1 < -90 || rlat1 > 90) return; + if (rlat0 < -90 || rlat0 > 90 || rlat1 < -90 || rlat1 > 90) + return (-1); // Check that both are in the same latitude zone, or abort. if (cprNLFunction(rlat0) != cprNLFunction(rlat1)) From 75438d5595208da219080f6efc8d04984613f8b2 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Thu, 2 Oct 2014 22:50:09 +0100 Subject: [PATCH 2/2] Change the marker color for aircraft with no recent updates. --- public_html/config.js | 1 + public_html/planeObject.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/public_html/config.js b/public_html/config.js index c4d7ecd..f7d8e2e 100644 --- a/public_html/config.js +++ b/public_html/config.js @@ -20,6 +20,7 @@ CONST_ZOOMLVL = 5; // The default marker color MarkerColor = "rgb(127, 127, 127)"; SelectedColor = "rgb(225, 225, 225)"; +StaleColor = "rgb(190, 190, 190)"; // -- Site Settings --------------------------------------- SiteShow = false; // true or false diff --git a/public_html/planeObject.js b/public_html/planeObject.js index dfb0130..98153fd 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -53,10 +53,16 @@ var planeObject = { // Should create an icon for us to use on the map... funcGetIcon : function() { + this.markerColor = MarkerColor; // If this marker is selected we should make it lighter than the rest. if (this.is_selected == true) { this.markerColor = SelectedColor; } + + // If we have not seen a recent update, change color + if (this.seen > 15) { + this.markerColor = StaleColor; + } // Plane marker var baseSvg = {