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.
Fork of Repo_Noeud_Mobile by
Diff: Communication/Xbee.cpp
- Revision:
- 30:389d09853cd1
- Parent:
- 24:1a16e7eabb0c
- Child:
- 32:7bdaac2c4cbf
diff -r 1a16e7eabb0c -r 389d09853cd1 Communication/Xbee.cpp --- a/Communication/Xbee.cpp Thu Mar 26 17:08:26 2015 +0000 +++ b/Communication/Xbee.cpp Mon Apr 06 18:43:51 2015 +0000 @@ -86,10 +86,9 @@ data[5] = mvf.accelData.z >> 8; data[6] = mvf.accelData.z & 0x00FF; - //Pas tres elegant, j'ai pas encore eu mon 2e cafe.. - mvf.flexSensor.index = 1 ? data[7] = 0x04 : data[7] = 0; - mvf.flexSensor.majeur = 1 ? data[7] += 0x02 : data[7] += 0; - mvf.flexSensor.annulaire = 1 ? data[7] += 0x01 : data[7] += 0; + mvf.flexSensor.index == 1 ? data[7] = 0x04 : data[7] = 0; + mvf.flexSensor.majeur == 1 ? data[7] += 0x02 : data[7] += 0; + mvf.flexSensor.annulaire == 1 ? data[7] += 0x01 : data[7] += 0; EnvoyerDonnees(data, 8); } @@ -124,10 +123,10 @@ receivedData.game = XbeePin->getc(); //Etat - buffer[0] = XbeePin->getc(); - receivedData.etat = buffer[0] == 0 ? false : true; - - //Est-ce qu'il y a un minimum de byte dans les data? + buffer[0] = XbeePin->getc(); + receivedData.etat = buffer[0] == 0 ? false : true; + + //Est-ce qu'il y a un minimum de byte dans les data? //Validate end byte if (XbeePin->getc() == 0x7E) {