comparison static/iwws.js @ 16:5a9b33dcdb2c default tip

Show how many samples as well as when the last sample was.
author Daniel O'Connor <darius@dons.net.au>
date Fri, 31 May 2013 13:36:26 +0930
parents ebf411c89a3d
children
comparison
equal deleted inserted replaced
15:ebf411c89a3d 16:5a9b33dcdb2c
126 yaxis : { tickFormatter : spdFormatter }, 126 yaxis : { tickFormatter : spdFormatter },
127 y2axis : { min : 0, tickFormatter : mmFormatter } 127 y2axis : { min : 0, tickFormatter : mmFormatter }
128 }); 128 });
129 // Reverse tzofs calculation as Date does local time 129 // Reverse tzofs calculation as Date does local time
130 var dobj = new Date(datacache['lastdata'] * 1000.0); 130 var dobj = new Date(datacache['lastdata'] * 1000.0);
131 $('#stamp').html(sprintf("Last data: %02d/%02d/%02d %02d:%02d:%02d", dobj.getFullYear(), dobj.getMonth() + 1, dobj.getDate(), 131 $('#stamp').html(sprintf("Last data: %04d/%02d/%02d %02d:%02d:%02d (%d samples)", dobj.getFullYear(), dobj.getMonth() + 1, dobj.getDate(),
132 dobj.getHours(), dobj.getMinutes(), dobj.getSeconds())); 132 dobj.getHours(), dobj.getMinutes(), dobj.getSeconds(), datacache['idx'].length));
133 } 133 }
134 134
135 function wind2angle(dir) { 135 function wind2angle(dir) {
136 var a = dir * (360.0 / 16.0); 136 var a = dir * (360.0 / 16.0);
137 return a; 137 return a;