Mini projet LOO
Dependencies: mbed APDS_9960 mbed-rtos
Home du projet
Diff: src/cLigne.cpp
- Revision:
- 29:95469b25e187
- Parent:
- 18:45dbd9948c97
- Child:
- 30:c647da947bd9
--- a/src/cLigne.cpp Wed Apr 20 14:18:18 2016 +0000 +++ b/src/cLigne.cpp Wed Apr 20 15:09:43 2016 +0000 @@ -17,16 +17,16 @@ _Leds[2].setPositionY(_positionY); _Leds[3].setPositionX(_positionX + 2); _Leds[3].setPositionY(_positionY); - for(unsigned char i = 0; i<4; i++) { + for(unsigned int i = 0; i<4; i++) { _Leds[i].setOldPositionX(_Leds[i].getPositionX()); } - for(unsigned char i = 0; i<4; i++) { + for(unsigned int i = 0; i<4; i++) { _Leds[i].setOldPositionY(_Leds[i].getPositionY()); } _typeForme = 0; } -cLigne::cLigne(unsigned char x, unsigned char y) { +cLigne::cLigne(unsigned int x, unsigned int y) { // variables à 0 _positionX = x; _positionY = y; @@ -41,10 +41,10 @@ _Leds[2].setPositionY(_positionY); _Leds[3].setPositionX(_positionX + 3); _Leds[3].setPositionY(_positionY); - for(unsigned char i = 0; i<4; i++) { + for(unsigned int i = 0; i<4; i++) { _Leds[i].setOldPositionX(_Leds[i].getPositionX()); } - for(unsigned char i = 0; i<4; i++) { + for(unsigned int i = 0; i<4; i++) { _Leds[i].setOldPositionY(_Leds[i].getPositionY()); } _typeForme = 0; @@ -53,7 +53,7 @@ void cLigne::rotationHoraire() { // Sauvegarde des anciennes positions - for (unsigned char i = 0; i < 4; i++) { + for (unsigned int i = 0; i < 4; i++) { _Leds[i].setOldPositionX(_Leds[i].getPositionX()); _Leds[i].setOldPositionY(_Leds[i].getPositionY()); }