Rearrangements to clock layout.
Provide UTC and last-receiver-update clocks.
This commit is contained in:
parent
e6a70345b5
commit
b2b0aa9afe
|
@ -24,27 +24,26 @@
|
||||||
<div id="sidebar_container">
|
<div id="sidebar_container">
|
||||||
<div id="sidebar_canvas">
|
<div id="sidebar_canvas">
|
||||||
<div id="timestamps" style="align: center">
|
<div id="timestamps" style="align: center">
|
||||||
<table width="100%"><tr>
|
<table width="100%">
|
||||||
<td>Local Time</td>
|
<tr>
|
||||||
<td>
|
<td align="center"> <canvas id="utcclock"></canvas> </td>
|
||||||
<canvas id="localclock" class="CoolClock:classic:40"></canvas>
|
<td align="center"> <canvas id="receiverclock"></canvas> </td>
|
||||||
</td>
|
</tr>
|
||||||
<td>UTC Time</td>
|
|
||||||
<td>
|
<tr>
|
||||||
<canvas id="gmtclock" class="CoolClock:classic:40::0"></canvas>
|
<td align="center">UTC</td>
|
||||||
</td>
|
<td align="center">Last Update</td>
|
||||||
</tr></table>
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="sudo_buttons">
|
<div id="sudo_buttons">
|
||||||
<table width="100%"><tr>
|
<table width="100%">
|
||||||
|
<tr>
|
||||||
<td width="150" style="text-align: center;" class="pointer">
|
<td width="150" style="text-align: center;" class="pointer">
|
||||||
[ <span onclick="resetMap();">Reset Map</span> ]
|
[ <span onclick="resetMap();">Reset Map</span> ]
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
</tr>
|
||||||
<td width="150" style="text-align: center;" id="setings_button" class="pointer">
|
</table>
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr></table>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="dump1090_infoblock">
|
<div id="dump1090_infoblock">
|
||||||
|
|
|
@ -28,6 +28,7 @@ var TrackedHistorySize = 0;
|
||||||
|
|
||||||
var SitePosition = null;
|
var SitePosition = null;
|
||||||
|
|
||||||
|
var ReceiverClock = null;
|
||||||
function fetchData() {
|
function fetchData() {
|
||||||
$.getJSON('data/aircraft.json', function(data) {
|
$.getJSON('data/aircraft.json', function(data) {
|
||||||
// Loop through all the planes in the data packet
|
// Loop through all the planes in the data packet
|
||||||
|
@ -65,6 +66,11 @@ function fetchData() {
|
||||||
|
|
||||||
refreshTableInfo();
|
refreshTableInfo();
|
||||||
refreshSelected();
|
refreshSelected();
|
||||||
|
|
||||||
|
if (ReceiverClock) {
|
||||||
|
var rcv = new Date(now * 1000);
|
||||||
|
ReceiverClock.render(rcv.getUTCHours(),rcv.getUTCMinutes(),rcv.getUTCSeconds());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +79,32 @@ function initialize() {
|
||||||
|
|
||||||
if (!ShowClocks) {
|
if (!ShowClocks) {
|
||||||
$('#timestamps').css('display','none');
|
$('#timestamps').css('display','none');
|
||||||
|
} else {
|
||||||
|
// Create the clocks.
|
||||||
|
new CoolClock({
|
||||||
|
canvasId: "utcclock",
|
||||||
|
skinId: "classic",
|
||||||
|
displayRadius: 40,
|
||||||
|
showSecondHand: true,
|
||||||
|
gmtOffset: 0,
|
||||||
|
showDigital: false,
|
||||||
|
logClock: false,
|
||||||
|
logClockRev: false
|
||||||
|
});
|
||||||
|
|
||||||
|
ReceiverClock = new CoolClock({
|
||||||
|
canvasId: "receiverclock",
|
||||||
|
skinId: "classic",
|
||||||
|
displayRadius: 40,
|
||||||
|
showSecondHand: true,
|
||||||
|
gmtOffset: 0,
|
||||||
|
showDigital: false,
|
||||||
|
logClock: false,
|
||||||
|
logClockRev: false
|
||||||
|
});
|
||||||
|
|
||||||
|
// disable ticking on the receiver clock, we will update it ourselves
|
||||||
|
ReceiverClock.tick = (function(){})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get receiver metadata, reconfigure using it, then continue
|
// Get receiver metadata, reconfigure using it, then continue
|
||||||
|
|
Loading…
Reference in a new issue