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
00001 #include "mouvement.h" 00002 00003 Mouvement::Mouvement(short code, short code_envoie, string definition, bool h) : 00004 _code(code), 00005 _code_envoie(code_envoie), 00006 _definition(definition), 00007 hand(h) 00008 { 00009 } 00010 00011 void Mouvement::sendData(Trame *trame) 00012 { 00013 char code[4]; 00014 00015 code[0] = hand ? 0x1 : 0x0; // Hand 00016 code[1] = (_code_envoie >> 8) & 0xF; // Code to send msb 00017 code[2] = (_code_envoie >> 4) & 0xF; // Code to send 00018 code[3] = _code_envoie & 0xF; // Code to send lsb 00019 00020 const char destination[8] = {0}; // Destination Null 00021 00022 trame->sendTransmitRequest(destination, code, sizeof(int)); // Trasmit code 00023 }
Generated on Thu Jul 14 2022 10:43:20 by
