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.
Dependencies: mbed APDS_9960 mbed-rtos
Diff: src/cMatrice.cpp
- Revision:
- 5:d6b0bf27bac6
- Parent:
- 4:b7a46af55574
- Child:
- 7:4b283e36b147
--- a/src/cMatrice.cpp Thu Mar 31 11:18:41 2016 +0000 +++ b/src/cMatrice.cpp Thu Mar 31 11:24:34 2016 +0000 @@ -15,7 +15,7 @@ { for(unsigned char j = 0; j < 8 ; j ++) { - _matrice[i][j] = COULEUR_LED_BLEU_FONCE; + _matrice[i][j] = LED_BLEU_FONCE; } } } @@ -44,7 +44,7 @@ { DigitalOut cs(p14); SPI matrice(p11,p12,p13); - _matrice[0][0] = COULEUR_LED_ORANGE; + _matrice[0][0] = LED_ORANGE; cs = 0; wait(0.5); @@ -66,15 +66,13 @@ // Changement de couleur des Leds for(unsigned char i = 0; i < 4 ; i++){ f.getLed(i).allumer(c); - _matrice[f.getLed(i).getPositionX()][f.getLed(i).getPositionY()] = c;//f.getLed(i).getCouleur(); - Serial pc(USBTX, USBRX); //tx, rx - pc.printf("x: %d, y: %d\n", f.getLed(i).getPositionX(), f.getLed(i).getPositionY()); + _matrice[f.getLed(i).getPositionX()][f.getLed(i).getPositionY()] = c; } } -void cMatrice::ajouterForme(cForme & f){ +void cMatrice::ajouterForme(cForme & f, unsigned char c){ _formes.insert(_formes.begin(), f); - afficherForme(f, COULEUR_LED_ROUGE); + afficherForme(f, c); } void cMatrice::supprimerForme(cForme & f){ @@ -92,7 +90,7 @@ { for(char j=0; j<8; j++) { - _matrice[i][j] = COULEUR_LED_NOIR; + _matrice[i][j] = LED_NOIR; matrice.write(_matrice[i][j]); } }