Skip to content

Commit

Permalink
uses the raspi GPIO path by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
marioquake committed Jun 19, 2013
1 parent c242ad3 commit fed83ac
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 17 deletions.
4 changes: 2 additions & 2 deletions OpenSprinklerPiServer/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,8 @@ function Program (_name, _zones)
function PiGpio()
{
var self = this;
//var GPIO_PATH = "/sys/class/gpio/";
var GPIO_PATH = "./gpio/";
var GPIO_PATH = "/sys/class/gpio/";
//var GPIO_PATH = "./gpio/";
var _OutExported = new Array();

this.SetupPin = SetupPin;
Expand Down
136 changes: 136 additions & 0 deletions OpenSprinklerPiServer/node_modules/restify/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 10 additions & 15 deletions OpenSprinklerPiServer/www/SprinklerCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ function SprinklerCtrl ($scope, $http, $templateCache)
}





$scope.CreateProgram = function(name)
{
var myData;
Expand Down Expand Up @@ -164,16 +161,25 @@ function SprinklerCtrl ($scope, $http, $templateCache)
{
});
}


$scope.UpdateProgramName = function(oldProgram, newName)
{
//helper
$scope.UpdateProgram(oldProgram, "Rename", {name:newName});
}


$scope.UpdateProgramAddZone = function(program, number, duration)
{
// helper
$scope.UpdateProgram(program, "Add Zone", {number:number,duration:duration});
}


$scope.UpdateProgramRemoveZone = function(program, number)
{
//helper
$scope.UpdateProgram(program, "Remove Zone", {number:number});
}

Expand Down Expand Up @@ -233,22 +239,11 @@ function SprinklerCtrl ($scope, $http, $templateCache)
}










//$scope.myUrl = 'http://10.0.0.11:8080/sprinkler/';
$scope.myUrl = '/sprinkler/';

$http.defaults.useXDomain = true;
delete $http.defaults.headers.common['X-Requested-With'];

$scope.ReadZones();
$scope.ReadPrograms();
}

SprinklerCtrl.$inject = ['$scope', '$http', '$templateCache'];
SprinklerCtrl.$inject = ['$scope', '$http', '$templateCache'];

0 comments on commit fed83ac

Please sign in to comment.