Skip to content

Commit

Permalink
Schedule running detect updated for Jessie; Reset sends pariod commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Tidey committed Nov 11, 2015
1 parent 18fc8bc commit c3c7578
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Web based interface for controlling the Raspberry Pi Camera, includes motion detection, time lapse, and image and video recording.
Current version 6.0.12
Current version 6.0.13
All information on this project can be found here: http://www.raspberrypi.org/forums/viewtopic.php?f=43&t=63276

The wiki page can be found here:
Expand Down
2 changes: 1 addition & 1 deletion www/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
define('LBASE_DIR',dirname(__FILE__));
//Global defines and utility functions
// version string
define('APP_VERSION', 'v6.0.12');
define('APP_VERSION', 'v6.0.13');

// name of this application
define('APP_NAME', 'RPi Cam Control');
Expand Down
15 changes: 6 additions & 9 deletions www/schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,14 @@ function isCli() {
}
return false;
}

function getSchedulePID() {
$pids = array();
exec("pgrep -f -l schedule.php", $pids);
exec("ps -ef | awk '$9==\"schedule.php\" {print $2}'", $pids);
$pidId = 0;
foreach($pids as $pid) {
if (strpos($pid, 'php ') !== false) {
$pidId = strpos($pid, ' ');
$pidId = substr($pid, 0, $pidId);
break;
if (count($pids) > 0) {
if (is_numeric($pids[0])) {
$pidId = $pids[0];
}
}
return $pidId;
Expand Down Expand Up @@ -637,13 +635,12 @@ function mainCLI() {
writeLog("RaspiCam support started");
$captureStart = 0;
$pipeIn = openPipe($schedulePars[SCHEDULE_FIFOIN]);
$lastDayPeriod = -1;
$cmdPeriod = -1;
$lastOnCommand = -1;
$timeout = 0;
$timeoutMax = 0; //Loop test will terminate after this (seconds) (used in test), set to 0 forever
while($timeoutMax == 0 || $timeout < $timeoutMax) {
writeLog("Scheduler loop is started");
$lastDayPeriod = -1;
$pollTime = $schedulePars[SCHEDULE_CMDPOLL];
$slowPoll = 0;
$managechecktime = time();
Expand Down

0 comments on commit c3c7578

Please sign in to comment.