kopia lustrzana https://github.com/cyoung/stratux
revert weather 'age' back to the short datetime reported with the message. we can revisite using 'age' once we have a valid system time for the raspberry pi to compute against
rodzic
98795f3da1
commit
d6da11c29c
|
@ -124,10 +124,14 @@ function WeatherCtrl($rootScope, $scope, $state, $http, $interval) {
|
|||
|
||||
data_item.flight_condition = parseFlightCondition(obj.Type, obj.Data);
|
||||
data_item.location = obj.Location;
|
||||
var dThen = parseShortDatetime(obj.Time);
|
||||
var dNow = new Date(obj.LocaltimeReceived);
|
||||
data_item.age = dThen.getTime();
|
||||
data_item.time = utcTimeString(Math.abs(dNow - dThen)) + " old";
|
||||
s = obj.Time;
|
||||
data_item.time = s.substring(0, 2) + '-' + s.substring(2, 4) + ':' + s.substring(4, 6) + 'Z';
|
||||
// we can not accurately determime the current time on the Stratux
|
||||
// calculating age of a weather report is indeterminate
|
||||
// var dThen = parseShortDatetime(obj.Time);
|
||||
// var dNow = new Date(obj.LocaltimeReceived);
|
||||
// data_item.age = dThen.getTime();
|
||||
// data_item.time = utcTimeString(Math.abs(dNow - dThen)) + " old";
|
||||
data_item.received = utcTimeString(obj.LocaltimeReceived);
|
||||
data_item.data = obj.Data;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue