DuckieTownCarHS

Dependencies:   TCS3200 X_NUCLEO_IKS01A2 mbed-rtos mbed

Fork of DuckieTownCar by Domenico Francesco De Angelis

Revision:
0:65ecca01ac5c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VM_Car/ByteCode.h	Wed Feb 15 13:27:01 2017 +0000
@@ -0,0 +1,28 @@
+#ifndef _ByteCode_h
+#define _ByteCode_h
+
+struct Code{
+    unsigned int cop : 4;//cop-> codice operativo, op-> operando di 4 bit ciascuno    
+    unsigned int op : 4;
+};
+
+struct ByteCode{
+    Code* code;
+    unsigned int dim_code; 
+};
+
+#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)*/
+
+/********************************
+* Definizione codici operativi  *
+*********************************/
+#define NOPE_CODE       0x0
+
+#define RANDOM_CODE         0xF
+#define DRITTO_CODE         0x1
+#define RIGHT_CODE          0x2
+#define LEFT_CODE           0x3
+#define CURVA_RIGHT_CODE    0x4
+#define CURVA_LEFT_CODE     0x5
+
+#endif
\ No newline at end of file