Skip to content

Commit 1c0c349

Browse files
authored
Merge pull request projecthorus#19 from LukePrior/main
togglable aprs hide
2 parents f900464 + 06bcf9c commit 1c0c349

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,13 @@ <h4>Visibility</h4>
170170
<input type="checkbox" id="opt_selective_sidebar">
171171
</div>
172172
</div>
173+
<div class="row option">
174+
<span><b>Show Low Altitude APRS</b></span>
175+
<div class="switch off" id="sw_hide_aprs">
176+
<span class="thumb"></span>
177+
<input type="checkbox" id="opt_hide_aprs">
178+
</div>
179+
</div>
173180
<h4>Other</h4>
174181
<hr/>
175182
<div class="row option">

js/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,7 @@ $(window).ready(function() {
724724
'#sw_hide_horizon',
725725
'#sw_hide_titles',
726726
'#sw_selective_sidebar',
727+
'#sw_hide_aprs',
727728
"#sw_nowelcome",
728729
"#sw_interpolate",
729730
];
@@ -816,6 +817,9 @@ $(window).ready(function() {
816817
case "opt_selective_sidebar":
817818
sidebar_update();
818819
break;
820+
case "opt_hide_aprs":
821+
clean_refresh(wvar.mode, true, false);
822+
break;
819823
case "opt_interpolate":
820824
if(on) { graph_gap_size = graph_gap_size_max; }
821825
else { graph_gap_size = graph_gap_size_default; }

js/format.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
function formatData(data) {
7+
var hideAprs = offline.get('opt_hide_aprs');
78
var response = {};
89
response.positions = {};
910
var dataTemp = [];
@@ -57,7 +58,7 @@ function formatData(data) {
5758
}
5859
}
5960
dataTempEntry.gps_alt = parseFloat((data[key][i].alt).toPrecision(8));
60-
if (dataTempEntry.gps_alt < 1500 && aprsflag) {
61+
if (dataTempEntry.gps_alt < 1500 && aprsflag && !hideAprs) {
6162
continue;
6263
}
6364
dataTempEntry.gps_lat = parseFloat((data[key][i].lat).toPrecision(8));

0 commit comments

Comments
 (0)