DuckieTownCarHS

Dependencies:   TCS3200 X_NUCLEO_IKS01A2 mbed-rtos mbed

Fork of DuckieTownCar by Domenico Francesco De Angelis

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ByteCode.h Source File

ByteCode.h

00001 #ifndef _ByteCode_h
00002 #define _ByteCode_h
00003 
00004 struct Code{
00005     unsigned int cop : 4;//cop-> codice operativo, op-> operando di 4 bit ciascuno    
00006     unsigned int op : 4;
00007 };
00008 
00009 struct ByteCode{
00010     Code* code;
00011     unsigned int dim_code; 
00012 };
00013 
00014 #define N_COP           3/*Per N_COP si intende solo il numero di cop che si possono usare, quindi non si contano quelli straordinari(NOPE e Random)*/
00015 
00016 /********************************
00017 * Definizione codici operativi  *
00018 *********************************/
00019 #define NOPE_CODE       0x0
00020 
00021 #define RANDOM_CODE         0xF
00022 #define DRITTO_CODE         0x1
00023 #define RIGHT_CODE          0x2
00024 #define LEFT_CODE           0x3
00025 #define CURVA_RIGHT_CODE    0x4
00026 #define CURVA_LEFT_CODE     0x5
00027 
00028 #endif