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 = {
|
newsettings = {
|
||||||
"GLimits": settings["GLimits"]
|
"GLimits": settings["GLimits"]
|
||||||
};
|
};
|
||||||
console.log(angular.toJson(newsettings));
|
// console.log(angular.toJson(newsettings));
|
||||||
setSettings(angular.toJson(newsettings));
|
setSettings(angular.toJson(newsettings));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -228,13 +228,14 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setOrientation = function(action) {
|
$scope.setOrientation = function(action) {
|
||||||
console.log("sending " + action + " message.");
|
// console.log("sending " + action + " message.");
|
||||||
$http.post(URL_AHRS_ORIENT, action).
|
$http.post(URL_AHRS_ORIENT, action).
|
||||||
then(function (response) {
|
then(function (response) {
|
||||||
console.log("sent " + action + " message.");
|
// console.log("sent " + action + " message.");
|
||||||
|
setTimeout(getSettings, 5000); // Sleep to allow leveling to finish.
|
||||||
}, function(response) {
|
}, function(response) {
|
||||||
// failure: cancel the calibration
|
// failure: cancel the calibration
|
||||||
console.log(response.data);
|
// console.log(response.data);
|
||||||
$scope.Orientation_Failure_Message = response.data;
|
$scope.Orientation_Failure_Message = response.data;
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case "forward":
|
case "forward":
|
||||||
|
|
Ładowanie…
Reference in New Issue