Fix loading importance. Needs to be -1 not -2. The first value is 1, but we want zero based.
This commit is contained in:
parent
64ab429519
commit
8a9c283c1c
|
@ -83,7 +83,7 @@ std::string load_monitor_sql =
|
|||
"`SectionLength`, `MinSectionLength`, `FrameSkip`, `MotionFrameSkip`, "
|
||||
"`FPSReportInterval`, `RefBlendPerc`, `AlarmRefBlendPerc`, `TrackMotion`, `Exif`,"
|
||||
"`RTSPServer`, `RTSPStreamName`,"
|
||||
"`SignalCheckPoints`, `SignalCheckColour`, `Importance`-2 FROM `Monitors`";
|
||||
"`SignalCheckPoints`, `SignalCheckColour`, `Importance`-1 FROM `Monitors`";
|
||||
|
||||
std::string CameraType_Strings[] = {
|
||||
"Local",
|
||||
|
@ -435,7 +435,7 @@ Monitor::Monitor()
|
|||
"SectionLength, MinSectionLength, FrameSkip, MotionFrameSkip, "
|
||||
"FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, Exif,"
|
||||
"`RTSPServer`,`RTSPStreamName`,
|
||||
"SignalCheckPoints, SignalCheckColour, Importance-2 FROM Monitors";
|
||||
"SignalCheckPoints, SignalCheckColour, Importance-1 FROM Monitors";
|
||||
*/
|
||||
|
||||
void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
|
||||
|
@ -601,7 +601,7 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
|
|||
rtsp_server = (*dbrow[col] != '0'); col++;
|
||||
rtsp_streamname = dbrow[col]; col++;
|
||||
|
||||
/*"SignalCheckPoints, SignalCheckColour, Importance-2 FROM Monitors"; */
|
||||
/*"SignalCheckPoints, SignalCheckColour, Importance-1 FROM Monitors"; */
|
||||
signal_check_points = atoi(dbrow[col]); col++;
|
||||
signal_check_colour = strtol(dbrow[col][0] == '#' ? dbrow[col]+1 : dbrow[col], 0, 16); col++;
|
||||
|
||||
|
@ -613,6 +613,7 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
|
|||
grayscale_val = signal_check_colour & 0xff; /* Clear all bytes but lowest byte */
|
||||
|
||||
importance = dbrow[col] ? atoi(dbrow[col]) : 0;// col++;
|
||||
if (importance < 0) importance = 0; // Should only be >= 0
|
||||
|
||||
// How many frames we need to have before we start analysing
|
||||
ready_count = std::max(warmup_count, pre_event_count);
|
||||
|
|
Loading…
Reference in New Issue