Merge branch 'dev' into 'dev'

Logic fix for object detection and motion. Allows for motion first to work with yes and no.

See merge request Shinobi-Systems/Shinobi!336
cron-addstorage-fix
Moe 2021-10-28 19:42:36 +00:00
commit 2c4bbeb5b7
1 changed files with 6 additions and 2 deletions

View File

@ -950,11 +950,15 @@ module.exports = function(s,config,lang){
console.log(err)
}
})
if(e.details.detector_use_detect_object === '1'){
if(e.details.detector_use_detect_object === '1' && e.details.detector_use_motion === '1' ){
s.group[e.ke].activeMonitors[e.id].spawn.stdio[4].on('data',function(data){
onDetectorJpegOutputSecondary(e,data)
})
}
}else{
s.group[e.ke].activeMonitors[e.id].spawn.stdio[4].on('data',function(data){
onDetectorJpegOutputAlone(e,data)
})
}
}else if(e.details.detector_use_detect_object === '1' && e.details.detector_send_frames !== '1'){
s.group[e.ke].activeMonitors[e.id].spawn.stdio[4].on('data',function(data){
onDetectorJpegOutputSecondary(e,data)