This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "State.h" | |
using namespace std; | |
class State { | |
private: | |
static State *currentState; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void byvalue(int a){ | |
a++; | |
} | |
void byreference(int& a){ | |
a++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte tmp1, tmp0; | |
tmp0=charToByte(trame[i+2]); | |
tmp1=charToByte(trame[i+1]); | |
byte myCRC = tmp1 * 16 + tmp0; // OU tmp1 << 4 | tmp0; | |
char CRC = calculChecksumGPS(trame); | |
if (myCRC== (byte)CRC) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dec2bin | |
Tant que le nombre est non nul: | |
Si le bit 0 est à 1: | |
Ajouter '1' à resultat | |
Sinon: | |
Ajouter '0' à resultat | |
declaler de 1 bità droite | |
Afficher resultat | |
Bin2dec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cmath> | |
//#include <string> | |
using namespace std; | |
char hexa [] = {'0','1','2','3','4','5','6', \ | |
'7','8','9','A','B','C','D','E','F'}; | |
unsigned char poids[] = {1,2,4,8,16,32,64,128}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
void convertirDec(); | |
void convertirBin(); | |
void convertirHex(); | |
int char2int (char); | |
char hexa_A [] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "fsm.h" | |
Traffic traffic(2, 4, 5, 8, 10, 12); // no constraint about the digital outputs | |
void setup() { | |
Serial.begin(9600); | |
} | |
String str = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************* | |
sinbrive april 2020 | |
File Decription: Finite State Machine general framework | |
*********************************************************************/ | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class transition { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string.h> | |
class splitter { | |
private: | |
char *_del; | |
char *_str; //=new char[20]; | |
bool _first; | |
char *_tok; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
from time import gmtime, strftime | |
import sys,random,socket | |
PORT_NUMBER = 8000 | |
HOSTNAME = socket.gethostname() | |
if len(sys.argv) > 1: |
NewerOlder