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 PowerControl
Fork of Projet_S5 by
mouvement.cpp@11:9c0786fc06b4, 2014-04-08 (annotated)
- Committer:
- joGenie
- Date:
- Tue Apr 08 13:46:22 2014 +0000
- Revision:
- 11:9c0786fc06b4
- Parent:
- 10:61b4d6c67dd7
- Child:
- 12:16390cea4420
new version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joGenie | 8:9bf215a760f5 | 1 | #include "mouvement.h" |
joGenie | 8:9bf215a760f5 | 2 | |
joGenie | 11:9c0786fc06b4 | 3 | Mouvement::Mouvement(int code, int code_envoie, string definition) : |
joGenie | 8:9bf215a760f5 | 4 | _code(code), |
joGenie | 8:9bf215a760f5 | 5 | _code_envoie(code_envoie), |
joGenie | 11:9c0786fc06b4 | 6 | _definition(definition) |
joGenie | 8:9bf215a760f5 | 7 | { |
joGenie | 8:9bf215a760f5 | 8 | } |
joGenie | 10:61b4d6c67dd7 | 9 | |
joGenie | 11:9c0786fc06b4 | 10 | void Mouvement::sendData(Trame *trame) |
joGenie | 10:61b4d6c67dd7 | 11 | { |
joGenie | 10:61b4d6c67dd7 | 12 | char code[4]; |
joGenie | 10:61b4d6c67dd7 | 13 | |
joGenie | 10:61b4d6c67dd7 | 14 | code[0] = (_code_envoie >> 24) & 0xFF; |
joGenie | 10:61b4d6c67dd7 | 15 | code[1] = (_code_envoie >> 16) & 0xFF; |
joGenie | 10:61b4d6c67dd7 | 16 | code[2] = (_code_envoie >> 8) & 0xFF; |
joGenie | 10:61b4d6c67dd7 | 17 | code[3] = _code_envoie & 0xFF; |
joGenie | 10:61b4d6c67dd7 | 18 | |
joGenie | 11:9c0786fc06b4 | 19 | trame->sendTransmitRequest(0, code, sizeof(int)); |
joGenie | 10:61b4d6c67dd7 | 20 | } |