white space and quiet warning
This commit is contained in:
parent
d99ee73ad3
commit
87140ecdb5
|
@ -174,7 +174,7 @@ Event::Event(
|
||||||
Error("Can't mkdir %s: %s", path, strerror(errno));
|
Error("Can't mkdir %s: %s", path, strerror(errno));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
path_ptr += snprintf(path, sizeof(path), "/%" PRIu64, id);
|
snprintf(path, sizeof(path), "/%" PRIu64, id);
|
||||||
if ( mkdir(path, 0755) ) {
|
if ( mkdir(path, 0755) ) {
|
||||||
if ( errno != EEXIST )
|
if ( errno != EEXIST )
|
||||||
Error("Can't mkdir %s: %s", path, strerror(errno));
|
Error("Can't mkdir %s: %s", path, strerror(errno));
|
||||||
|
|
|
@ -62,39 +62,39 @@ $minY = 0;
|
||||||
$maxY = $monitor->Height()-1;
|
$maxY = $monitor->Height()-1;
|
||||||
|
|
||||||
if ( !isset($newZone) ) {
|
if ( !isset($newZone) ) {
|
||||||
if ( $zid > 0 ) {
|
if ( $zid > 0 ) {
|
||||||
$zone = dbFetchOne( 'SELECT * FROM Zones WHERE MonitorId = ? AND Id=?', NULL, array( $monitor->Id(), $zid ) );
|
$zone = dbFetchOne( 'SELECT * FROM Zones WHERE MonitorId = ? AND Id=?', NULL, array( $monitor->Id(), $zid ) );
|
||||||
} else {
|
} else {
|
||||||
$zone = array(
|
$zone = array(
|
||||||
'Id' => 0,
|
'Id' => 0,
|
||||||
'Name' => translate('New'),
|
'Name' => translate('New'),
|
||||||
'Type' => 'Active',
|
'Type' => 'Active',
|
||||||
'MonitorId' => $monitor->Id(),
|
'MonitorId' => $monitor->Id(),
|
||||||
'NumCoords' => 4,
|
'NumCoords' => 4,
|
||||||
'Coords' => sprintf( "%d,%d %d,%d, %d,%d %d,%d", $minX, $minY, $maxX, $minY, $maxX, $maxY, $minX, $maxY ),
|
'Coords' => sprintf( "%d,%d %d,%d, %d,%d %d,%d", $minX, $minY, $maxX, $minY, $maxX, $maxY, $minX, $maxY ),
|
||||||
'Area' => $monitor->Width() * $monitor->Height(),
|
'Area' => $monitor->Width() * $monitor->Height(),
|
||||||
'AlarmRGB' => 0xff0000,
|
'AlarmRGB' => 0xff0000,
|
||||||
'CheckMethod' => 'Blobs',
|
'CheckMethod' => 'Blobs',
|
||||||
'MinPixelThreshold' => '',
|
'MinPixelThreshold' => '',
|
||||||
'MaxPixelThreshold' => '',
|
'MaxPixelThreshold' => '',
|
||||||
'MinAlarmPixels' => '',
|
'MinAlarmPixels' => '',
|
||||||
'MaxAlarmPixels' => '',
|
'MaxAlarmPixels' => '',
|
||||||
'FilterX' => '',
|
'FilterX' => '',
|
||||||
'FilterY' => '',
|
'FilterY' => '',
|
||||||
'MinFilterPixels' => '',
|
'MinFilterPixels' => '',
|
||||||
'MaxFilterPixels' => '',
|
'MaxFilterPixels' => '',
|
||||||
'MinBlobPixels' => '',
|
'MinBlobPixels' => '',
|
||||||
'MaxBlobPixels' => '',
|
'MaxBlobPixels' => '',
|
||||||
'MinBlobs' => '',
|
'MinBlobs' => '',
|
||||||
'MaxBlobs' => '',
|
'MaxBlobs' => '',
|
||||||
'OverloadFrames' => '',
|
'OverloadFrames' => '',
|
||||||
'ExtendAlarmFrames' => '',
|
'ExtendAlarmFrames' => '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$zone['Points'] = coordsToPoints( $zone['Coords'] );
|
$zone['Points'] = coordsToPoints( $zone['Coords'] );
|
||||||
$zone['AreaCoords'] = preg_replace( '/\s+/', ',', $zone['Coords'] );
|
$zone['AreaCoords'] = preg_replace( '/\s+/', ',', $zone['Coords'] );
|
||||||
|
|
||||||
$newZone = $zone;
|
$newZone = $zone;
|
||||||
} # end if new Zone
|
} # end if new Zone
|
||||||
|
|
||||||
# Ensure Zone fits within the limits of the Monitor
|
# Ensure Zone fits within the limits of the Monitor
|
||||||
|
|
Loading…
Reference in New Issue