diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 0d1ef3fe9..76c298bfd 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -2534,15 +2534,10 @@ our @options = ( the events may be shorter than the section length if an alarm has occurred. `, - type => $types{boolean}, type => { db_type =>'string', - hint =>'time|idle|alarm', - pattern =>qr|^([tia])|i, - format =>q( ($1 =~ /^t/) - ? 'time' - : ($1 =~ /^i/ ? 'idle' : 'time' ) - ) + hint =>'time|duration|idle|alarm', + pattern =>qr/^(time|duration|idle|alarm)/, }, category => 'config', }, diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 95a56b9b2..d17ed649d 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1995,6 +1995,8 @@ bool Monitor::Analyse() { // Need to guard around event creation/deletion from Reload() std::lock_guard lck(event_mutex); int score = 0; + // Track this separately as alarm_frame_count messes with the logic + int motion_score = -1; // if we have been told to be OFF, then we are off and don't do any processing. if (trigger_data->trigger_state != TriggerState::TRIGGER_OFF) { @@ -2139,7 +2141,6 @@ bool Monitor::Analyse() { Event::StringSet zoneSet; if (snap->image) { - int motion_score = 0; // decoder may not have been able to provide an image if (!ref_image.Buffer()) { Debug(1, "Assigning instead of Detecting"); @@ -2152,6 +2153,7 @@ bool Monitor::Analyse() { } else { // didn't assign, do motion detection maybe and blending definitely if (!(analysis_image_count % (motion_frame_skip+1))) { + motion_score = 0; Debug(1, "Detecting motion on image %d, image %p", snap->image_index, snap->image); // Get new score. if ((analysis_image == ANALYSISIMAGE_YCHANNEL) && snap->y_image) { @@ -2177,7 +2179,7 @@ bool Monitor::Analyse() { if (zone.AlarmImage()) snap->analysis_image->Overlay(*(zone.AlarmImage())); } - Debug(1, "Setting zone score %d to %d", zone_index, zone.Score()); + Debug(4, "Setting score for zone %d to %d", zone_index, zone.Score()); zone_scores[zone_index] = zone.Score(); zone_index ++; } //alarm_image.Assign(*(snap->analysis_image)); @@ -2258,7 +2260,7 @@ bool Monitor::Analyse() { } else { Debug(1, "!score state=%s, snap->score %d", State_Strings[state].c_str(), snap->score); // We only go out of alarm if we actually did motion detection or aren't doing any. - if ((snap->score >= 0) or (shared_data->analysing != ANALYSING_ALWAYS)) { + if ((motion_score >= 0) or (shared_data->analysing != ANALYSING_ALWAYS)) { alert_to_alarm_frame_count = alarm_frame_count; // load same value configured for alarm_frame_count if (state == ALARM) { diff --git a/web/skins/classic/css/base/views/options.css b/web/skins/classic/css/base/views/options.css index 01f0a10f3..d430e90b0 100644 --- a/web/skins/classic/css/base/views/options.css +++ b/web/skins/classic/css/base/views/options.css @@ -31,18 +31,27 @@ input.large { } #sidebar { - overflow-y: auto; min-width: 160px; - height: 100vh; } #optionsContainer { } + #options { - margin-right: -15px; - overflow-y: auto; - height: 100%; +/* margin-right: -15px;*/ /* you shouldn't do this for the sake of shifting the scrool bar, it breaks the style in different places. done differently*/ + width: 100%; } + +body.sticky #options { + height: calc(100% - 50px); /* It's bad, but it's temporary */ + overflow-y: auto; +} + +body.sticky #sidebar { + height: 100%; + overflow-y: auto; +} + #options div.col-md { text-align: left; } @@ -97,14 +106,10 @@ input[name="newStorage[Url]"] { } form { -/* height: 100% is to make scrollbars work in #options */ - display: flex; - flex-direction: column; +/* display: flex;*/ +/* flex-direction: column;*/ height: 100%; -/* - * Why extra padding at top? padding-top: 2rem; - */ } @media screen and (max-width:767px) { diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index 9a0829cd2..cf797bf81 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -310,14 +310,15 @@ foreach (array_map('basename', glob('skins/'.$skin.'/css/*', GLOB_ONLYDIR)) as $ -
+
-
+
+
'; @@ -327,9 +328,9 @@ foreach (array_map('basename', glob('skins/'.$skin.'/css/*', GLOB_ONLYDIR)) as $ $optionPromptText = !empty($OLANG[$shortName])?$OLANG[$shortName]['Prompt']:$value['Prompt']; $optionCanEdit = $canEdit && !$value['System']; ?> -
- -
+
+ +
- + 3 @@ -387,14 +388,15 @@ foreach (array_map('basename', glob('skins/'.$skin.'/css/*', GLOB_ONLYDIR)) as $ echo '

Note: This value has been overriden via configuration files in '.ZM_CONFIG. ' or ' . ZM_CONFIG_SUBDIR.'.
The overriden value is: '.constant($name).'

'.PHP_EOL; } ?> - -
-
+ +
+
-
+
+