diff --git a/web/plates/js/ahrs.js b/web/plates/js/ahrs.js index e99134a2..2fb8165f 100644 --- a/web/plates/js/ahrs.js +++ b/web/plates/js/ahrs.js @@ -163,6 +163,9 @@ function gMeterRenderer(locationId, plim, nlim) { .addClass('marks') .style('fill-opacity', '0'); + this.min_el = gMeter.group().addClass('min'); + this.min_el.polygon('0,0 -170,0 -160,-5 0,-5').addClass('pointer'); + this.min_el.polygon('0,0 -170,0 -160,+5 0,+5').addClass('pointerBG'); this.pointer_el = gMeter.group().addClass('g'); this.pointer_el.polygon('0,0 -170,0 -150,-10 0,-10').addClass('pointer'); @@ -172,10 +175,6 @@ function gMeterRenderer(locationId, plim, nlim) { this.max_el.polygon('0,0 -170,0 -150,-5 0,-5').addClass('pointer'); this.max_el.polygon('0,0 -170,0 -150,+5 0,+5').addClass('pointerBG'); - this.min_el = gMeter.group().addClass('min'); - this.min_el.polygon('0,0 -170,0 -160,-5 0,-5').addClass('pointer'); - this.min_el.polygon('0,0 -170,0 -160,+5 0,+5').addClass('pointerBG'); - gMeter.circle(40).cx(0).cy(0).addClass('center'); var reset = gMeter.group().cx(-165).cy(165).addClass('reset'); @@ -214,7 +213,8 @@ gMeterRenderer.prototype = { }, reset: function() { - this.max = this.g; - this.min = this.g; + this.g = 1; + this.max = 1; + this.min = 1; } }; diff --git a/web/plates/js/gps.js b/web/plates/js/gps.js index 500bcc2d..b9d84501 100644 --- a/web/plates/js/gps.js +++ b/web/plates/js/gps.js @@ -132,6 +132,9 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) { statusGPS.classList.remove("on"); } if (status.AHRSStatus & 0x02) { + if (statusIMU.classList.contains("off")) { + setTimeout(gMeter.reset(), 1000); + } statusIMU.classList.remove("off"); statusIMU.classList.add("on"); } else {