kopia lustrzana https://github.com/cyoung/stratux
Update settings display on web UI after orientation.
rodzic
2a132bb9cc
commit
d854fb01be
|
@ -156,7 +156,7 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
|
|||
newsettings = {
|
||||
"GLimits": settings["GLimits"]
|
||||
};
|
||||
console.log(angular.toJson(newsettings));
|
||||
// console.log(angular.toJson(newsettings));
|
||||
setSettings(angular.toJson(newsettings));
|
||||
}
|
||||
};
|
||||
|
@ -228,13 +228,14 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
|
|||
};
|
||||
|
||||
$scope.setOrientation = function(action) {
|
||||
console.log("sending " + action + " message.");
|
||||
// console.log("sending " + action + " message.");
|
||||
$http.post(URL_AHRS_ORIENT, action).
|
||||
then(function (response) {
|
||||
console.log("sent " + action + " message.");
|
||||
// console.log("sent " + action + " message.");
|
||||
setTimeout(getSettings, 5000); // Sleep to allow leveling to finish.
|
||||
}, function(response) {
|
||||
// failure: cancel the calibration
|
||||
console.log(response.data);
|
||||
// console.log(response.data);
|
||||
$scope.Orientation_Failure_Message = response.data;
|
||||
switch (action) {
|
||||
case "forward":
|
||||
|
@ -246,4 +247,4 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
|
|||
$scope.Ui.turnOn("modalCalibrateFailed");
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue