Print info only once

pull/1486/head
Piero Toffanin 2022-06-28 23:56:49 -04:00
rodzic 9e09da12ff
commit 4a9ca4c283
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -30,6 +30,7 @@ def make_model_key(make, model):
return ("%s %s" % (make.strip(), model.strip())).lower().strip()
warn_db_missing = {}
info_db_found = {}
def get_rolling_shutter_readout(make, model, override_value=0):
global warn_db_missing
@ -39,8 +40,9 @@ def get_rolling_shutter_readout(make, model, override_value=0):
key = make_model_key(make, model)
if key in RS_DATABASE:
log.ODM_INFO("Rolling shutter profile for \"%s %s\" selected, using %sms as --rolling-shutter-readout." % (make, model, RS_DATABASE[key]))
warn_db_missing[key] = False
if not key in info_db_found:
log.ODM_INFO("Rolling shutter profile for \"%s %s\" selected, using %sms as --rolling-shutter-readout." % (make, model, RS_DATABASE[key]))
info_db_found[key] = True
return float(RS_DATABASE[key])
else:
# Warn once