/**
 * ======================================================================
 * Libraries
 * ======================================================================
 */

// standard c libraries
#include <conio.h>			//console IO
#include <unistd.h>
#include <stdlib.h>
#include <string.h>

// brickos libraries
// lnp = lego networking protocol (comes with brickos)
#include <lnp/sys/lnp.h>
#include <lnp/sys/lnp-logical.h>
#include <lnp/lnp-logical.h>
#include <dsensor.h>
#include <dkey.h>			//for dkey
#include <dmotor.h>
#include <dsound.h>
#include <sys/tm.h>



/**
 * ======================================================================
 * GLOBAL CONSTANTS
 * ======================================================================
 */

#define ROBOTS_NUM 8	/* number of robots */

#define XL_SPEED 255
#define L_SPEED 200
#define M_SPEED 170
#define S_SPEED 120
#define XS_SPEED 85
#define FLOATING  0

#define DIR_FWD rev	/*Map FWD direction to our robot's hardware*/
#define DIR_REV fwd	/*Map REV direction to our robot's hardware*/

#define ROT_CW 20
#define ROT_CCW 1
#define MOV_FWD 2
#define MOV_BWD 3
#define RARCS_FWD 4
#define RARCS_BWD 5
#define LARCS_FWD 6
#define LARCS_BWD 7
#define RARCM_FWD 8
#define RARCM_BWD 9
#define LARCM_FWD 10
#define LARCM_BWD 11
#define RARCL_FWD 16
#define RARCL_BWD 18
#define LARCL_FWD 14
#define LARCL_BWD 17
#define FRENAR 19
#define MOVSLOW_FWD 21
#define MOVSLOW_BWD 22

#define XXH 9
#define XH 8
#define H 7
#define XXL 6
#define XL 5
#define L 4
#define M 3
#define S 2
#define XS 1
#define XXS 0

#define R_ARC 0
#define L_ARC 1

/*
#define BACK_FAST  1
#define BACK_MID   2
#define BACK_SLOW  3
#define FLOATING   4
#define STOPPED    5
#define FORW_SLOW  6
#define FORW_MID   7
#define FORW_FAST  8
*/ 
