kopia lustrzana https://github.com/cyoung/stratux
Don't display serialout settings unless a serialout device is present.
rodzic
30fe7295c4
commit
31bbf1bc1b
|
@ -17,8 +17,10 @@ function SettingsCtrl($rootScope, $scope, $state, $location, $window, $http) {
|
|||
settings = angular.fromJson(data);
|
||||
// consider using angular.extend()
|
||||
$scope.rawSettings = angular.toJson(data, true);
|
||||
$scope.visible_serialout = false;
|
||||
if ((settings.SerialOutputs !== undefined) && (settings.SerialOutputs !== null) && (settings.SerialOutputs['/dev/serialout0'] !== undefined)) {
|
||||
$scope.Baud = settings.SerialOutputs['/dev/serialout0'].Baud;
|
||||
$scope.visible_serialout = true;
|
||||
}
|
||||
$scope.UAT_Enabled = settings.UAT_Enabled;
|
||||
$scope.ES_Enabled = settings.ES_Enabled;
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<input class="col-xs-7" type="number_format" required ng-model="PPM" placeholder="integer" ng-blur="updateppm()" />
|
||||
</form>
|
||||
</div>
|
||||
<div class="form-group reset-flow">
|
||||
<div class="form-group reset-flow" ng-class="{ 'section_invisible': (!visible_serialout)}">
|
||||
<label class="control-label col-xs-5">Serial Output Baudrate</label>
|
||||
<form name="ppmForm" ng-submit="updateBaud()" novalidate>
|
||||
<!-- type="number" not supported except on mobile -->
|
||||
|
|
Ładowanie…
Reference in New Issue