tentative de foutre des points

This commit is contained in:
2026-04-01 22:33:28 +02:00
parent fea6467396
commit 902a626776

View File

@@ -1,5 +1,6 @@
import tm1637 import tm1637
import time as t import time as t
_display = None _display = None
def get_display(): def get_display():
@@ -10,14 +11,22 @@ def get_display():
return _display return _display
def afficher_temperature(temperature, temperature_moyenne): def afficher_temperature(temperature, temperature_moyenne):
print(f"Test affichage: Cible {temperature} | Moyenne {temperature_moyenne}") print(f"Test affichage: Cible {temperature} : Moyenne {temperature_moyenne}")
try: try:
temp1 = int(temperature) temp1 = int(temperature)
temp2 = int(temperature_moyenne) temp2 = int(temperature_moyenne)
texte_ecran = f"{temp1:02d}{temp2:02d}"
disp = get_display() disp = get_display()
texte_ecran = f"{temp1:02d}{temp2:02d}"
if hasattr(disp, 'show_doublepoint'):
disp.show_doublepoint(True)
elif hasattr(disp, 'point'):
disp.point(True)
disp.show(texte_ecran) disp.show(texte_ecran)
except Exception as e: except Exception as e:
print(f"Erreur d'affichage : {e}") print(f"Erreur d'affichage : {e}")
execpt keybo