code petit robot pour homologation
Fork of CRAC-Strat_2017_V2 by
Diff: Display/Display.cpp
- Revision:
- 0:ad97421fb1fb
diff -r 000000000000 -r ad97421fb1fb Display/Display.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Display/Display.cpp Wed Apr 13 22:04:54 2016 +0000 @@ -0,0 +1,26 @@ +#include "Display.h" +#include <stdarg.h> +#include <stdio.h> + +CANMessage trame_Tx = CANMessage(); +unsigned char curseur=0; + +void tactile_printf(const char* format, ...) +{ + unsigned char i,j; + va_list args; + va_start(args, format); + vsprintf(tableau_ecran+curseur,format, args); + va_end(args); + // envoi sur le bus can du tableau complet de l'ecran + trame_Tx.id=ECRAN_PRINTF_1; + for(j=0; j<4; j++) { + trame_Tx.type=CANData; + trame_Tx.len=8; + for(i=0; i<8; i++) + trame_Tx.data[i]=tableau_ecran[i+j*8]; + can1.write(trame_Tx); + wait_us(200); + trame_Tx.id += 1; + } +} \ No newline at end of file