add front end button toggeling

This commit is contained in:
Shannon Sterz 2016-02-18 15:44:58 +01:00
parent 2738141f21
commit 7139c2d38c

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;
};