code de start qui marche a la fin du premier match, base pour la suite

Fork of CRAC-Strat_2017_homologation_petit_rob by CRAC Team

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Display.cpp Source File

Display.cpp

00001 #include "Display.h"
00002 #include <stdarg.h>
00003 #include <stdio.h>
00004 
00005 CANMessage trame_Tx = CANMessage();
00006 unsigned char curseur=0;
00007 
00008 void tactile_printf(const char* format, ...)
00009 {
00010     unsigned char i,j;
00011     va_list args;
00012     va_start(args, format);
00013     vsprintf(tableau_ecran+curseur,format, args);
00014     va_end(args);
00015     // envoi sur le bus can du tableau complet de l'ecran
00016     trame_Tx.id=ECRAN_PRINTF_1;
00017     for(j=0; j<4; j++) {
00018         trame_Tx.type=CANData;
00019         trame_Tx.len=8;
00020         for(i=0; i<8; i++)
00021             trame_Tx.data[i]=tableau_ecran[i+j*8];
00022         can1.write(trame_Tx);
00023         wait_us(200);
00024         trame_Tx.id += 1;
00025     }
00026 }