s2
Revision 1:367a17638cfb, committed 2021-06-10
- Comitter:
- arkadia
- Date:
- Thu Jun 10 15:26:52 2021 +0000
- Parent:
- 0:66a03c7cfb16
- Commit message:
- pour fschneid
Changed in this revision
affichage.cpp | Show annotated file Show diff for this revision Revisions of this file |
affichage.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 66a03c7cfb16 -r 367a17638cfb affichage.cpp --- a/affichage.cpp Tue Jun 08 08:22:07 2021 +0000 +++ b/affichage.cpp Thu Jun 10 15:26:52 2021 +0000 @@ -80,9 +80,9 @@ drawline(40,120,220,120); drawline(40,40,40,120); drawline(220,40,220,120); - sprintf(_phrase,"CZ = %0.1f",CZ); + sprintf(_phrase,"FZ = %0.1f",FZ); TFT.Text(44,45,27,0,_phrase); - TFT.Text(45,72,21,0,"CZ est le coefficient de"); // 21 Police petite + TFT.Text(45,72,21,0,"FZ est le poids de"); // 21 Police petite TFT.Text(45,90,21,0,"portance de l'aile d'avion"); @@ -111,9 +111,9 @@ drawline(240,120,440,120); drawline(440,40,440,120); drawline(240,40,240,120); - sprintf(_phrase,"CX = %0.1f",CX); + sprintf(_phrase,"FX = %0.1f",FX); TFT.Text(244,45,27,0,_phrase); - TFT.Text(245,72,21,0,"CX est le coefficient de"); + TFT.Text(245,72,21,0,"FX est le poids de"); TFT.Text(245,90,21,0,"trainee de l'aile d'avion"); @@ -146,8 +146,14 @@ drawline(365,185,365,195); // Trait entre les deux ailes derrière drawline(130,185,130,195); - TFT.Text(150,180,21,0,"Angle d'incidence : "); - TFT.Number(270,180,27, 0, Deg); + + + TFT.Text(140,180,21,0,"Angle inc."); + + sprintf(_phrase,"C : %0.0fdg M : %0.1fdg",AngleIncCons,AngleIncMes); + TFT.Text(210,180,27, 0,_phrase); + + // TFT.Number(270,180,27, 0, AngleIncMes); drawline(160,220,355,205); // Grande ligne basse drawline(160,220,140,210); // trait montant avant @@ -203,6 +209,85 @@ } +void EcranMessage(char *messageecr) +{ + + TFT.DLstart(); // + TFT.DL(CLEAR_COLOR_RGB(255, 255, 255)); // Les 3 lignes sont à laisser tel quel pour le démarrage de l'afficheur + TFT.DL(CLEAR(1, 1, 1)); // + TFT.FgColor(0xC618); + TFT.DL(COLOR_RGB(0, 0, 0)); // Couleur utilisée + + drawline(20,20,20,250); // Ligne verticale Gauche + drawline(460,20,460,250); // Ligne verticale Droite + + drawline(20,20,460,20); // Ligne horizontale Haute + drawline(20,250,460,250); // Ligne horizontale Basse + + + // Partie Haute avec \\\\\\\\\\\\\ + + drawline(0,0,20,20); + drawline(20,20,40,40); + drawline(55,20,35,0); + drawline(90,20,70,0); + drawline(130,20,110,0); + drawline(165,20,145,0); + drawline(200,20,180,0); + drawline(220,40,200,20); + TFT.Text(210,0,27,0,"L.V.H"); // Affiche L.V.H + drawline(240,40,260,20); + drawline(260,20,280,0); + drawline(300,20,320,0); + drawline(340,20,360,0); + drawline(380,20,400,0); + drawline(420,20,440,0); + drawline(460,20,480,0); + drawline(460,20,440,40); + + + // Partie Basse avec \\\\\\\\\\\\\ + + drawline(0,270,20,250); + drawline(20,250,40,270); + drawline(60,250,80,270); + drawline(100,250,120,270); + drawline(140,250,160,270); + drawline(180,250,200,270); + TFT.Text(210,252,27,0,"BESANCON"); // Affiche BESANCON + drawline(300,250,320,270); + drawline(340,250,360,270); + drawline(380,250,400,270); + drawline(420,250,440,270); + drawline(460,250,480,270); + + // Chapeau gauche avec \\\\\\\\\\\\\ + + + drawline(0,40,20,60); + drawline(0,80,40,120); + drawline(20,140,0,160); + drawline(20,180,0,200); + drawline(20,220,0,240); + + // Chapeau droit avec \\\\\\\\\\\\\ + + drawline(440,120,480,80); + drawline(460,60,480,40); + //drawline(460,100,480,120); + drawline(460,140,480,160); + drawline(460,180,480,200); + drawline(460,220,480,240); + + TFT.Text(170,135,21,0,messageecr); + + TFT.DL(DISPLAY()); // permet l'affichage sur l'ecran + TFT.Swap(); // Permet l'affichage sur l'ecran + + +} + + // permet de faire varier la luminosité 128 est le plus lumineux. ft_void_t luminosite( ft_int32_t lum) {
diff -r 66a03c7cfb16 -r 367a17638cfb affichage.h --- a/affichage.h Tue Jun 08 08:22:07 2021 +0000 +++ b/affichage.h Thu Jun 10 15:26:52 2021 +0000 @@ -1,9 +1,9 @@ #ifndef _affichage_h #define _affichage_h #include "FT_Platform.h" -extern float CZ; -extern float CX; -extern float Deg; +extern float FZ; +extern float FX; +extern float AngleIncMes; extern float CH0; extern float CH1; extern float CH2; @@ -12,7 +12,9 @@ extern float CH5; extern float CH6; extern float CH7; +extern float AngleIncCons; void EcranPrincipale(); +void EcranMessage(char *messageecr); ft_void_t luminosite( ft_int32_t lum); ft_void_t drawline( ft_int32_t x0, ft_int32_t y0,ft_int32_t x1,ft_int32_t y1); #endif \ No newline at end of file