add front end button toggeling

This commit is contained in:
Stefan Sterz 2016-02-18 15:44:58 +01:00
parent 2738141f21
commit 7139c2d38c
1 changed files with 6 additions and 1 deletions

View File

@ -41,9 +41,14 @@ app.controller('MainCtrl', ['$scope', 'arduino', function ($scope, arduino){
$scope.RCs = arduino.RCs;
$scope.irTest = function(){
for (var i = $scope.RCs.length - 1; i >= 0; i--) {
$scope.RCs[i].state = true;
}
$scope.irTest = function(RC){
arduino.irTest();
RC.state = (RC.state) ? false : true;
};