[Fixed] const paths + /lib/gpio bugfix

This commit is contained in:
xdrm-brackets 2017-02-18 18:49:04 +01:00
parent 4bd6ce33f8
commit 0642e51e1b
6 changed files with 11 additions and 3 deletions

View File

@ -15,7 +15,7 @@
private $value;
public function __construct($pin){
if( !is_int($pin) )
if( !preg_match('@^\d+$@', $pin) )
throw new Exception("pin must be an integer");

View File

@ -22,6 +22,8 @@
/* (2) Set mode to in */
$gpio->value = Pin::GPIO_HIGH;
return 0;
}

View File

@ -22,6 +22,8 @@
/* (2) Set mode to in */
$gpio->mode = Pin::GPIO_IN;
return 0;
}

View File

@ -22,6 +22,8 @@
/* (2) Set mode to in */
$gpio->value = Pin::GPIO_LOW;
return 0;
}

View File

@ -22,6 +22,8 @@
/* (2) Set mode to in */
$gpio->mode = Pin::GPIO_OUT;
return 0;
}

View File

@ -9,11 +9,11 @@
define('DATA_DIR', ROOT_DIR.'/data');
define('CONF_DIR', ROOT_DIR.'/conf');
#define('SOURCE_DIR', ROOT_DIR.'/source');
define('SOURCE_DIR', ROOT_DIR.'/source');
define('SOURCE_DIR', '/home/xdrm-brackets/Desktop/git.xdr/home/xdrm-brackets/Desktop/git.xdrm.io/logauth-sats');
define('TMP_DIR', ROOT_DIR.'/tmp');
# CONFIGURATION FILES
define('SECRET_CONF', '/home/xdrm-brackets/Desktop/git.xdr/home/xdrm-brackets/Desktop/git.xdrm.io/logauth-sats');
define('SECRET_CONF', CONF_DIR.'/machine.secret');
define('STATE_CONF', CONF_DIR.'/machine.state');
define('BRANCH_CONF', CONF_DIR.'/machine.branch');
define('ID_CONF', CONF_DIR.'/machine.id');