Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

Commit 4b5d3d7

Browse files
Fix two comments in initial review
1 parent 0a8bee9 commit 4b5d3d7

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/Config.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <libconfig.h++>
77
#include "Config.hpp"
88
#include "Logger.hpp"
9+
#include "imp/imp_ivs_move.h"
910

1011
#define MODULE "CONFIG"
1112

@@ -230,7 +231,7 @@ std::vector<ConfigItem<int>> CFG::getIntItems()
230231
{"motion.frame_width", motion.frame_width, IVS_AUTO_VALUE, validateIntGe0},
231232
{"motion.frame_height", motion.frame_height, IVS_AUTO_VALUE, validateIntGe0},
232233
{"motion.monitor_stream", motion.monitor_stream, 1, validateInt1},
233-
{"motion.roi_count", motion.roi_count, IVS_AUTO_VALUE, [](const int &v) { return v >= 1 && v <= 52; }},
234+
{"motion.roi_count", motion.roi_count, IVS_AUTO_VALUE, [](const int &v) { return v >= 1 && v <= IMP_IVS_MOVE_MAX_ROI_CNT; }},
234235
{"rtsp.est_bitrate", rtsp.est_bitrate, 5000, validateIntGe0},
235236
{"rtsp.out_buffer_size", rtsp.out_buffer_size, 500000, validateIntGe0},
236237
{"rtsp.port", rtsp.port, 554, validateInt65535},

src/Motion.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ void Motion::detect()
128128

129129
int Motion::init()
130130
{
131-
int i = 0;
132-
133131
LOG_INFO("Initialize motion detection.");
134132

135133
if((cfg->motion.monitor_stream == 0 && !cfg->stream0.enabled) ||
@@ -176,7 +174,7 @@ int Motion::init()
176174
", width: " << move_param.frameInfo.width <<
177175
", height: " << move_param.frameInfo.height);
178176

179-
for (i = 0; i < cfg->motion.roi_count; i++) {
177+
for (int i = 0; i < cfg->motion.roi_count; i++) {
180178
move_param.sense[i] = cfg->motion.sensitivity;
181179
move_param.roiRect[i].p0.x = cfg->motion.rois[i].p0_x;
182180
move_param.roiRect[i].p0.y = cfg->motion.rois[i].p0_y;

0 commit comments

Comments
 (0)