Example #1
0
    emoFatalError("Es ist leider ein unvorhergesehener Fehler aufgetreten", "Falls Ihnen folgender Fehler nichts sagt, wenden Sie sich bitte mit der Fehlermeldung an den Support:<h2>" . get_class($e) . "</h2><pre>" . $e->getTraceAsString() . "</pre>", "poolPi");
}
$left = "";
$right = "";
$AC = anyC::get("poolAnzeige", "poolAnzeigeTyp", "row");
$AC->addOrderV3("poolAnzeigeOrder");
$AC->addOrderV3("poolAnzeigeID");
while ($A = $AC->n()) {
    $left .= poolPi::row($A);
}
$AC = anyC::get("poolAnzeige", "poolAnzeigeTyp", "col");
$AC->addOrderV3("poolAnzeigeOrder");
$AC->addOrderV3("poolAnzeigeID");
$A = $AC->n();
if ($A != null) {
    $right = poolPi::col($A);
}
?>

<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <title>poolPi</title>
        <meta name="description" content="">
		
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0">
		
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
		<meta name="mobile-web-app-capable" content="yes" />
Example #2
0
        switch ($signal) {
            case SIGTERM:
                print "Caught SIGTERM\n";
                exit;
            case SIGKILL:
                print "Caught SIGKILL\n";
                exit;
            case SIGINT:
                global $running;
                $running = false;
        }
    }
    pcntl_signal(SIGTERM, "signal_handler");
    pcntl_signal(SIGINT, "signal_handler");
}
$pi = new poolPi();
$fd = dio_open('/dev/ttyUSB0', O_RDONLY | O_NOCTTY);
# | O_NONBLOCK);
if (!$fd) {
    exit(0);
}
dio_fcntl($fd, F_SETFL, O_SYNC);
dio_tcsetattr($fd, array('baud' => 19200, 'bits' => 8, 'stop' => 1, 'parity' => 0));
$running = true;
$buf = "";
while ($running) {
    if ($fd === false) {
        exit(1);
    }
    $data = dio_read($fd);
    if (substr(bin2hex($data), 0, 4) == "0000") {