version qui corrige tous les beugs

Dependents:   Projet_client_serveur EX5 ex10 ex11 ... more

Files at this revision

API Documentation at this revision

Comitter:
slowness
Date:
Tue Nov 08 07:22:34 2016 +0000
Parent:
2:ba3449b7e070
Commit message:
Version sans bug

Changed in this revision

IHM.cpp Show annotated file Show diff for this revision Revisions of this file
IHM.h Show annotated file Show diff for this revision Revisions of this file
diff -r ba3449b7e070 -r a9e51ac904e2 IHM.cpp
--- a/IHM.cpp	Tue Nov 08 02:05:57 2016 +0000
+++ b/IHM.cpp	Tue Nov 08 07:22:34 2016 +0000
@@ -15,14 +15,25 @@
     unsigned char i,j;
     va_list arg;
     va_start(arg,format);
-    vsprintf(tableau_ecran+curseur,format,arg);
-     //   IHM_vprintf(format,arg);
+    curseur=curseur+vsprintf(tableau_ecran+curseur%64,format,arg);
+    if(curseur>31)
+    {   
+        for(i=32; i<curseur;i++)
+        {
+            tableau_ecran[i%32]=tableau_ecran[i];
+        }
+        curseur=curseur%32;
+    }
+    else
+    {
+        for(i=0; i<32;i++)
+        {
+            if(tableau_ecran[i]==0)
+                tableau_ecran[i]=20;
+        }   
+    }
     va_end(arg);
-    for(i=0; i<32;i++)
-    {
-        if(tableau_ecran[i]==0)
-            tableau_ecran[i]=20;
-    }
+    tableau_ecran[32]='\0';
     for(j=0; j<4; j++) {
         trame_Tx.id=LCD_CHAR0+j;
         trame_Tx.type=CANData;
diff -r ba3449b7e070 -r a9e51ac904e2 IHM.h
--- a/IHM.h	Tue Nov 08 02:05:57 2016 +0000
+++ b/IHM.h	Tue Nov 08 07:22:34 2016 +0000
@@ -111,12 +111,8 @@
     CANMessage can_MsgRx[SIZE_FIFO], can_MsgTx;
 //extern unsigned char Reception_CAN;
 CANMessage trame_Tx;
-char tableau_ecran[33];
+char tableau_ecran[65],tableau_temporaire[200];
     CAN can;
     void can_ISR_Reader(void);
     void CAN_automate_reception(void);
-    void IHM_sendchar (char data);
-    void IHM_printf(const char* format, ...);
-    void IHM_vprintf(const char* format, ...);
-    void IHM_sendstring (char* message);
 };