1
0
Fork 0

Phi: fix airspeed and heading display

round to integer instead of truncate
This commit is contained in:
Torsten Dreyer 2015-10-09 09:51:49 +02:00
parent 5a1a2a64a1
commit d04bf9d849

View file

@ -46,11 +46,11 @@ define([
}); });
this.headingTextAnimation = ko.pureComputed(function() { this.headingTextAnimation = ko.pureComputed(function() {
return sprintf.sprintf("%03d", self.heading()); return sprintf.sprintf("%03d", Math.round(self.heading()));
}); });
this.asiTextAnimation = ko.pureComputed(function() { this.asiTextAnimation = ko.pureComputed(function() {
return sprintf.sprintf("%3d", self.airspeed()); return sprintf.sprintf("%3d", Math.round(self.airspeed()));
}); });
this.altimeterThousandsTextAnimation = ko.pureComputed(function() { this.altimeterThousandsTextAnimation = ko.pureComputed(function() {