cleaned up gpio and device code, implemented dummy/dry run mode

This commit is contained in:
2014-06-19 12:27:31 +02:00
parent 3e4765d071
commit 1449ec643f
8 changed files with 481 additions and 84 deletions

View File

@ -154,7 +154,7 @@ class GpioPin
public function sysfsWrite($pin, $file, $value)
{
if ($pin) {
if ($pin!==null) {
$path = "/sys/class/gpio/gpio{$pin}/{$file}";
} else {
$path = "/sys/class/gpio/{$file}";