02-ago: [proyecto] vigilancia - test de prueba (16/16 OK) + franja horaria testeable + gitignore modelo

This commit is contained in:
minguezsanzjuanjose
2026-08-02 12:35:37 +02:00
parent 496c2bb9bc
commit e75649f7e6
3 changed files with 214 additions and 2 deletions

View File

@@ -15,8 +15,9 @@ if USAR_YOLO:
from detector_persona import DetectorPersona
def dentro_de_franja_horaria() -> bool:
hora_actual = datetime.now().hour
def dentro_de_franja_horaria(hora_actual=None) -> bool:
if hora_actual is None:
hora_actual = datetime.now().hour
inicio = config.HORA_INICIO
fin = config.HORA_FIN
if inicio < fin: