Projet S5 Info / Mbed 2 deprecated Projet_S5

Dependencies:   mbed PowerControl

Fork of Projet_S5 by Jonathan Tousignant

Committer:
joGenie
Date:
Mon Apr 07 18:33:53 2014 +0000
Revision:
10:61b4d6c67dd7
Parent:
8:9bf215a760f5
Child:
11:9c0786fc06b4
With xbee

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joGenie 8:9bf215a760f5 1 #include "mouvement.h"
joGenie 8:9bf215a760f5 2
joGenie 10:61b4d6c67dd7 3 Mouvement::Mouvement(int code, int code_envoie, string definition, Trame* trame) :
joGenie 8:9bf215a760f5 4 _code(code),
joGenie 8:9bf215a760f5 5 _code_envoie(code_envoie),
joGenie 10:61b4d6c67dd7 6 _definition(definition),
joGenie 10:61b4d6c67dd7 7 _trame(trame)
joGenie 8:9bf215a760f5 8 {
joGenie 8:9bf215a760f5 9 }
joGenie 10:61b4d6c67dd7 10
joGenie 10:61b4d6c67dd7 11
joGenie 10:61b4d6c67dd7 12 void Mouvement::sendData()
joGenie 10:61b4d6c67dd7 13 {
joGenie 10:61b4d6c67dd7 14 char code[4];
joGenie 10:61b4d6c67dd7 15
joGenie 10:61b4d6c67dd7 16 code[0] = (_code_envoie >> 24) & 0xFF;
joGenie 10:61b4d6c67dd7 17 code[1] = (_code_envoie >> 16) & 0xFF;
joGenie 10:61b4d6c67dd7 18 code[2] = (_code_envoie >> 8) & 0xFF;
joGenie 10:61b4d6c67dd7 19 code[3] = _code_envoie & 0xFF;
joGenie 10:61b4d6c67dd7 20
joGenie 10:61b4d6c67dd7 21 _trame->sendTransmitRequest(0, code, sizeof(int));
joGenie 10:61b4d6c67dd7 22 }