Mini projet LOO
Dependencies: mbed APDS_9960 mbed-rtos
Home du projet
src/cForme.cpp@3:493dd1cf30a4, 2016-03-30 (annotated)
- Committer:
- Willheisen
- Date:
- Wed Mar 30 10:22:07 2016 +0000
- Revision:
- 3:493dd1cf30a4
- Parent:
- 1:ab5f440f4156
- Child:
- 4:b7a46af55574
30/03/2016 12:22 wilfried
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
clementdoreau | 0:b2acac6abf2b | 1 | #include "cForme.h" |
clementdoreau | 0:b2acac6abf2b | 2 | |
clementdoreau | 1:ab5f440f4156 | 3 | cForme::cForme(){ |
clementdoreau | 1:ab5f440f4156 | 4 | _orientation = 1; // Orientation par défaut |
clementdoreau | 1:ab5f440f4156 | 5 | _positionX = 0; |
clementdoreau | 1:ab5f440f4156 | 6 | _positionY = 0; |
clementdoreau | 0:b2acac6abf2b | 7 | } |
clementdoreau | 0:b2acac6abf2b | 8 | |
clementdoreau | 1:ab5f440f4156 | 9 | |
clementdoreau | 1:ab5f440f4156 | 10 | // GETTERS |
clementdoreau | 1:ab5f440f4156 | 11 | |
clementdoreau | 1:ab5f440f4156 | 12 | unsigned char cForme::getOrientation(){ |
clementdoreau | 1:ab5f440f4156 | 13 | return _orientation; |
clementdoreau | 0:b2acac6abf2b | 14 | } |
clementdoreau | 0:b2acac6abf2b | 15 | |
clementdoreau | 1:ab5f440f4156 | 16 | unsigned char cForme::getPositionX(){ |
clementdoreau | 1:ab5f440f4156 | 17 | return _positionX; |
clementdoreau | 1:ab5f440f4156 | 18 | } |
clementdoreau | 1:ab5f440f4156 | 19 | |
clementdoreau | 1:ab5f440f4156 | 20 | unsigned char cForme::getPositionY(){ |
clementdoreau | 1:ab5f440f4156 | 21 | return _positionY; |
clementdoreau | 0:b2acac6abf2b | 22 | } |
clementdoreau | 0:b2acac6abf2b | 23 | |
clementdoreau | 1:ab5f440f4156 | 24 | cLed *cForme::getLed(){ |
clementdoreau | 1:ab5f440f4156 | 25 | return &_Leds[0]; |
clementdoreau | 0:b2acac6abf2b | 26 | } |
clementdoreau | 0:b2acac6abf2b | 27 | |
clementdoreau | 1:ab5f440f4156 | 28 | // SETTERS |
clementdoreau | 1:ab5f440f4156 | 29 | void cForme::setOrientation(unsigned char orientation){ |
clementdoreau | 1:ab5f440f4156 | 30 | _orientation = orientation; |
clementdoreau | 0:b2acac6abf2b | 31 | } |
clementdoreau | 0:b2acac6abf2b | 32 | |
clementdoreau | 1:ab5f440f4156 | 33 | void cForme::setPositionX(unsigned char x){ |
clementdoreau | 1:ab5f440f4156 | 34 | _positionX = x; |
clementdoreau | 1:ab5f440f4156 | 35 | } |
clementdoreau | 1:ab5f440f4156 | 36 | void cForme::setPositionY(unsigned char y){ |
clementdoreau | 1:ab5f440f4156 | 37 | _positionY = y; |
clementdoreau | 0:b2acac6abf2b | 38 | } |
clementdoreau | 0:b2acac6abf2b | 39 | |
clementdoreau | 0:b2acac6abf2b | 40 |