le test

Dependencies:   LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI

Files at this revision

API Documentation at this revision

Comitter:
ascheriit
Date:
Thu May 23 09:42:38 2019 +0000
Parent:
41:927f0ffab4d7
Commit message:
la connexion avec le pc est annulee.

Changed in this revision

Tick/Tick.cpp Show annotated file Show diff for this revision Revisions of this file
TraceMatrix/Trace.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
main.h Show annotated file Show diff for this revision Revisions of this file
--- a/Tick/Tick.cpp	Thu May 23 09:16:56 2019 +0000
+++ b/Tick/Tick.cpp	Thu May 23 09:42:38 2019 +0000
@@ -5,7 +5,7 @@
 AnalogOut pinHP(PA_5); //Pin pour le reveil
 Ticker son; //son utile pour l'alarme
 int GLOBAL_BOOL_ALARME=0;
-extern Serial pc;
+//extern Serial pc;
 
 void T_incermment(){
     GLOBAL_VALEUR_TICK++;
@@ -41,14 +41,14 @@
         const double offset = 65535/2;
         double rads = 0.0;
         uint16_t sample = 0;
-        pc.printf("entree dans la boucle\n");
+        //pc.printf("entree dans la boucle\n");
         for (int i = 0; i < 12000; i++) {
             rads = (pi * i) / 180.0f;
             sample = (uint16_t)(amplitude * (offset * (cos(rads + pi))) + offset);
             pinHP.write_u16(sample);
             
         }
-        pc.printf("sortie de la boucle\n");
+        //pc.printf("sortie de la boucle\n");
     }
 }
 
--- a/TraceMatrix/Trace.cpp	Thu May 23 09:16:56 2019 +0000
+++ b/TraceMatrix/Trace.cpp	Thu May 23 09:42:38 2019 +0000
@@ -1,7 +1,7 @@
 #include "Trace.h"
 
 LCD_DISCO_F429ZI lcdT;
-extern Serial pc;
+//extern Serial pc;
 
 void clean(){
     lcdT.Clear(COULEUR_FOND);
@@ -23,11 +23,11 @@
 }
 
 void DisplayMatrixClean(int xexp, int yexp, matrice* mat, int TaillePix,long long int couleur,long long int couleurFond){
-    pc.printf("DebutTrace\n");
+    //pc.printf("DebutTrace\n");
     lcdT.SetTextColor(couleurFond); //Avant de faire comme la fonction précédente on trace un rectangle en fond de ce que l'on va tracer.
     matrice WorkingMatrix = *mat;
     if(WorkingMatrix.tailleX<TailleMatrice && WorkingMatrix.tailleX<TailleMatrice){
-        pc.printf("Matrice Tracable\n");
+        //pc.printf("Matrice Tracable\n");
         lcdT.FillRect(yexp,xexp,TaillePix * WorkingMatrix.tailleY,TaillePix * WorkingMatrix.tailleX);
         lcdT.SetTextColor(couleur);
         for(int y=0;y<WorkingMatrix.tailleY;y++){
@@ -39,9 +39,9 @@
             }
         }
     }
-    pc.printf("Liberation\n");
+    //pc.printf("Liberation\n");
     free(mat);
-    pc.printf("FinTrace\n");
+    //pc.printf("FinTrace\n");
     /*lcdT.SetTextColor(LCD_COLOR_BLUE);    //lignes de test
     lcdT.FillRect(xinit,yinit,TaillePix,TaillePix); */
 }
--- a/main.cpp	Thu May 23 09:16:56 2019 +0000
+++ b/main.cpp	Thu May 23 09:42:38 2019 +0000
@@ -1,6 +1,6 @@
 #include "main.h"
 
-Serial pc(USBTX, USBRX);
+//Serial pc(USBTX, USBRX);
 extern int GLOBAL_BOOL_ALARME; //booléen de gestion du son
 extern int VRGL_AFFICHAGE_ELEMENTS;
 
@@ -10,7 +10,7 @@
     temps RealTime; //Initialisation du temps
     RealTime.heure=0;
     RealTime.minute=0;
-    pc.printf("Debut\n");
+    //pc.printf("Debut\n");
     T_initialise(60 - (DEBUG * 58));
     clean();
     A_DisplayAlarmes(&alarmes);
@@ -26,10 +26,10 @@
             A_checkAlarmes(&alarmes,&RealTime);
         }
         if(boolCh){
-            pc.printf("DebutAff\n");
+            //pc.printf("DebutAff\n");
             H_afficheHorlogeElemClean(RealTime,150,120,5,COULEUR_HEURE,COULEUR_FOND);
-            pc.printf("FinAFF\n");
-            pc.printf("\n");
+            //pc.printf("FinAFF\n");
+            //pc.printf("\n");
         }
         if(H_toogleElem()){
             if(GLOBAL_BOOL_ALARME){
--- a/main.h	Thu May 23 09:16:56 2019 +0000
+++ b/main.h	Thu May 23 09:42:38 2019 +0000
@@ -4,7 +4,7 @@
 #include "Trace.h" //Ces fonctions servent à afficher des choses sur l'écrant de la STM32
 #include "codeurRotatifRelatif.h" //Ces fonctions srvent à l'utilisation du codeur rotatif à relatif.
 #include "horloge.h" //Ces fonctions sont relative à la manipulation du temps.
-#include "Tick.h" //Ces fonctions remplace le besoin d'une RTC
+#include "Tick.h" //Ces fonctions remplace le besoin d'une RTC et gèrent le son
 
 #define ever ;;
 #define DEBUG 0 //Mettre 1 si on est un train de faire des tests, mettre 0 sinon
@@ -51,11 +51,11 @@
 o    PC3                            o    o
 o    o                              o    o
 o    o                              o    o
-o    PA5                            o    o
+o    PA5 -> son                     o    o
 o    o                              PB7  o
 o    o                              o    PB4
 o    o                              o    o
-o    o                              o    PG13 -> alarme
+o    o                              o    PG13 -> alarme numérique
 o    o                              o    o
 o    o                              o    PG9
 o    o                              o    o