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
Diff: mouvement.cpp
- Revision:
- 10:61b4d6c67dd7
- Parent:
- 8:9bf215a760f5
- Child:
- 11:9c0786fc06b4
--- a/mouvement.cpp Mon Apr 07 14:08:36 2014 +0000 +++ b/mouvement.cpp Mon Apr 07 18:33:53 2014 +0000 @@ -1,8 +1,22 @@ #include "mouvement.h" -Mouvement::Mouvement(int code, int code_envoie, string definition) : +Mouvement::Mouvement(int code, int code_envoie, string definition, Trame* trame) : _code(code), _code_envoie(code_envoie), - _definition(definition) + _definition(definition), + _trame(trame) { } + + +void Mouvement::sendData() +{ + char code[4]; + + code[0] = (_code_envoie >> 24) & 0xFF; + code[1] = (_code_envoie >> 16) & 0xFF; + code[2] = (_code_envoie >> 8) & 0xFF; + code[3] = _code_envoie & 0xFF; + + _trame->sendTransmitRequest(0, code, sizeof(int)); +}