Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: NBoard_IHM_V2 ex20_fonction ex21_PWM1 ex26 ... more
Fork of IHM_V2 by
Revision 4:a9e51ac904e2, committed 2016-11-08
- Comitter:
- slowness
- Date:
- Tue Nov 08 07:22:34 2016 +0000
- Parent:
- 2:ba3449b7e070
- Child:
- 5:255e1428f05f
- 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 |
--- 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;
--- 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);
};
