diff --git a/composants/byPanda/septsegments.py b/composants/byPanda/septsegments.py index 8226f0b..a80d2cc 100644 --- a/composants/byPanda/septsegments.py +++ b/composants/byPanda/septsegments.py @@ -1,5 +1,6 @@ import tm1637 import time as t + _display = None def get_display(): @@ -10,14 +11,22 @@ def get_display(): return _display 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: temp1 = int(temperature) temp2 = int(temperature_moyenne) - texte_ecran = f"{temp1:02d}{temp2:02d}" + 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) except Exception as e: - print(f"Erreur d'affichage : {e}") - execpt keybo \ No newline at end of file + print(f"Erreur d'affichage : {e}") \ No newline at end of file