Merge branch 'dev-fix-detector-motion-counts' into 'dev'

Fix detector motion counts being inserted into monitor object too early

See merge request Shinobi-Systems/Shinobi!207
merge-requests/210/head
Moe 2020-06-24 21:10:34 +00:00
commit 5c19166125
1 changed files with 4 additions and 4 deletions

View File

@ -380,10 +380,6 @@ module.exports = function(s,config,lang){
}
}
var eventTime = new Date()
//motion counter
if(filter.addToMotionCounter && filter.record){
s.group[d.ke].activeMonitors[d.id].detector_motion_count.push(d)
}
if(filter.countObjects && currentConfig.detector_obj_count === '1' && currentConfig.detector_obj_count_in_region !== '1'){
didCountingAlready = true
countObjects(d)
@ -440,6 +436,10 @@ module.exports = function(s,config,lang){
// fails indifference check for modified indifference
return
}
//motion counter
if(filter.addToMotionCounter && filter.record){
s.group[d.ke].activeMonitors[d.id].detector_motion_count.push(d)
}
//
if(d.doObjectDetection === true){
s.ocvTx({