Revert "Merge branch 'always_record_on_motion' into dev"

This reverts commit 5f804ce396, reversing
changes made to 184bc2fa69.
build-default-monitor-config-from-definitions
Ian Rubado 2020-04-05 22:12:15 -04:00
parent 5f804ce396
commit a6b78c0a4e
6 changed files with 5 additions and 59 deletions

View File

@ -2985,25 +2985,6 @@ module.exports = function(s,config,lang){
} }
] ]
}, },
{
"name": "detail=detector_always_record",
"field": lang['Start recording on motion'],
"description": "",
"default": "0",
"example": "",
"selector": "h_det_alwy_rec",
"fieldType": "select",
"possible": [
{
"name": lang.No,
"value": "0"
},
{
"name": lang.Yes,
"value": "1"
}
]
},
{ {
hidden: true, hidden: true,
"name": "detail=detector_fps_object", "name": "detail=detector_fps_object",

View File

@ -969,6 +969,5 @@
"There are no monitors that you can view with this account.":"There are no monitors that you can view with this account.", "There are no monitors that you can view with this account.":"There are no monitors that you can view with this account.",
"Delete Monitors and Files": "Delete Monitors and Files", "Delete Monitors and Files": "Delete Monitors and Files",
"Select atleast one monitor to delete": "Select atleast one monitor to delete.", "Select atleast one monitor to delete": "Select atleast one monitor to delete.",
"Use Built-In":"Use Built-In", "Use Built-In":"Use Built-In"
"Start recording on motion":"Start recording on motion"
} }

View File

@ -63,25 +63,7 @@ s.detectObject=function(buffer,d,tx,frameLocation){
time: resp.time time: resp.time
} }
}) })
} else if (d.mon.detector_pam === '1' && d.mon.detector_always_record === '1' ) { }
var width = parseFloat(d.mon.detector_scale_y)
var height = parseFloat(d.mon.detector_scale_x)
tx({
f:'trigger',
id:d.id,
ke:d.ke,
details:{
plug:config.plug,
name:'motion_before_tensorflow',
reason:'motion',
imgHeight:width,
imgWidth:height
}
})
}
})
.catch(error => {
console.log(error)
}) })
// var detectStuff = function(frame,callback){ // var detectStuff = function(frame,callback){
// detector.detect(frame) // detector.detect(frame)

View File

@ -27,7 +27,6 @@ var yolo = require('node-yolo-shinobi');//this is @vapi/node-yolo@1.2.4 without
// var yolo = require('@vapi/node-yolo'); // var yolo = require('@vapi/node-yolo');
var detector = new yolo(__dirname + "/models", "cfg/coco.data", "cfg/yolov3.cfg", "yolov3.weights"); var detector = new yolo(__dirname + "/models", "cfg/coco.data", "cfg/yolov3.cfg", "yolov3.weights");
s.detectObject=function(buffer,d,tx,frameLocation){ s.detectObject=function(buffer,d,tx,frameLocation){
var timeStart = new Date()
var detectStuff = function(frame,callback){ var detectStuff = function(frame,callback){
detector.detect(frame) detector.detect(frame)
.then(detections => { .then(detections => {
@ -53,24 +52,10 @@ s.detectObject=function(buffer,d,tx,frameLocation){
reason:'object', reason:'object',
matrices:matrices, matrices:matrices,
imgHeight:parseFloat(d.mon.detector_scale_y), imgHeight:parseFloat(d.mon.detector_scale_y),
imgWidth:parseFloat(d.mon.detector_scale_x), imgWidth:parseFloat(d.mon.detector_scale_x)
time: (new Date()) - timeStart
} }
}) })
}else if (d.mon.detector_pam === '1' && d.mon.detector_always_record === '1' ) { }
tx({
f:'trigger',
id:d.id,
ke:d.ke,
details:{
plug:config.plug,
name:'motion_before_yolo',
reason:'motion',
imgHeight:parseFloat(d.mon.detector_scale_y),
imgWidth:parseFloat(d.mon.detector_scale_x)
}
})
}
fs.unlink(frame,function(){ fs.unlink(frame,function(){
}) })

File diff suppressed because one or more lines are too long

View File

@ -3571,7 +3571,6 @@ $.aM.generateDefaultMonitorSettings=function(){
"detector_scale_x": "640", "detector_scale_x": "640",
"detector_scale_y": "480", "detector_scale_y": "480",
"detector_use_motion": "1", "detector_use_motion": "1",
"detector_always_record":"0",
"detector_use_detect_object": "0", "detector_use_detect_object": "0",
"detector_frame": "0", "detector_frame": "0",
"detector_sensitivity": "", "detector_sensitivity": "",