Fix importance got cutnpasted to where it shouldn't be

This commit is contained in:
Isaac Connor 2022-01-09 14:46:48 -05:00
parent 21762585d9
commit e9db12ca94
1 changed files with 1 additions and 2 deletions

View File

@ -635,8 +635,6 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
onvif_options = std::string(dbrow[col] ? dbrow[col] : ""); col++; onvif_options = std::string(dbrow[col] ? dbrow[col] : ""); col++;
onvif_event_listener = (*dbrow[col] != '0'); col++; onvif_event_listener = (*dbrow[col] != '0'); col++;
importance = dbrow[col] ? atoi(dbrow[col]) : 0;// col++;
/*"SignalCheckPoints, SignalCheckColour, Importance-1 FROM Monitors"; */ /*"SignalCheckPoints, SignalCheckColour, Importance-1 FROM Monitors"; */
signal_check_points = atoi(dbrow[col]); col++; signal_check_points = atoi(dbrow[col]); col++;
signal_check_colour = strtol(dbrow[col][0] == '#' ? dbrow[col]+1 : dbrow[col], 0, 16); col++; signal_check_colour = strtol(dbrow[col][0] == '#' ? dbrow[col]+1 : dbrow[col], 0, 16); col++;
@ -648,6 +646,7 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) {
blue_val = BLUE_VAL_BGRA(signal_check_colour); blue_val = BLUE_VAL_BGRA(signal_check_colour);
grayscale_val = signal_check_colour & 0xff; /* Clear all bytes but lowest byte */ 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 if (importance < 0) importance = 0; // Should only be >= 0
// How many frames we need to have before we start analysing // How many frames we need to have before we start analysing