File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -467,14 +467,16 @@ public static function refreshNFO($id) {
467467 case reolinkAPI::CAM_GET_AIALARM :
468468 switch ($ json_data ['value ' ]['AiAlarm ' ]['ai_type ' ]) {
469469 case "people " :
470- $ camcmd -> checkAndUpdateCmd ( 'SetSdSensitivityPeopleState ' , $ json_data [ ' value ' ][ ' AiAlarm ' ][ ' sensitivity ' ]) ;
471- $ camcmd -> checkAndUpdateCmd ( 'SetAlarmDelayPeopleState ' , $ json_data [ ' value ' ][ ' AiAlarm ' ][ ' stay_time ' ]) ;
470+ $ s1 = 'SetSdSensitivityPeopleState ' ;
471+ $ s2 = 'SetAlarmDelayPeopleState ' ;
472472 break ;
473473 case "vehicle " :
474- $ camcmd -> checkAndUpdateCmd ( 'SetSdSensitivityVehicleState ' , $ json_data [ ' value ' ][ ' AiAlarm ' ][ ' sensitivity ' ]) ;
475- $ camcmd -> checkAndUpdateCmd ( 'SetAlarmDelayVehicleState ' , $ json_data [ ' value ' ][ ' AiAlarm ' ][ ' stay_time ' ]) ;
474+ $ s1 = 'SetSdSensitivityVehicleState ' ;
475+ $ s2 = 'SetAlarmDelayVehicleState ' ;
476476 break ;
477477 }
478+ $ camcmd ->checkAndUpdateCmd ($ s1 , $ json_data ['value ' ]['AiAlarm ' ]['sensitivity ' ]);
479+ $ camcmd ->checkAndUpdateCmd ($ s2 , $ json_data ['value ' ]['AiAlarm ' ]['stay_time ' ]);
478480 log::add ('reolink ' , 'debug ' , 'ai_type check : ' . $ json_data ['value ' ]['AiAlarm ' ]['ai_type ' ]);
479481 break ;
480482
You can’t perform that action at this time.
0 commit comments