félicitations

This commit is contained in:
2026-04-03 18:35:33 +02:00
parent 9770617cd4
commit f275ad60f0
6 changed files with 154 additions and 164 deletions

View File

@@ -7,14 +7,12 @@ import RPi.GPIO as GPIO
porte = SystemePorteRFID()
def call_board1():
# 1. On lance l'alarme dans son propre thread pour qu'elle ne bloque pas le reste
thread_alarme = threading.Thread(target=alarme.boucle_principale, daemon=True)
thread_alarme.start()
print("[BOARD 1] Système d'alarme lancé en arrière-plan.")
try:
# 2. La boucle principale ne gère plus que le RFID
while True:
porte.mettreAJour()
time.sleep(0.3)
@@ -22,6 +20,5 @@ def call_board1():
except KeyboardInterrupt:
print("\nArrêt manuel du programme.")
finally:
# On utilise GPIO.cleanup() directement car alarme.cleanup n'existe pas
porte.cleanup()
GPIO.cleanup()