Update settings display on web UI after orientation.
@@ -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":
