#ifndef _DEFINES_H #define _DEFINES_H #ifndef NULL #define NULL 0 #endif //Integer definition #ifndef int8 #ifdef __int8 #define int8 __int8 #else #define int8 char #endif #endif #ifndef int16 #ifdef __int16 #define int16 __int16 #else #define int16 int #endif #endif #ifndef int32 #ifdef __int32 #define int32 __int32 #else #define int32 long #endif #endif #ifndef int64 #ifdef __int64 #define int64 __int64 #else #define int64 long long #endif #endif //Unsigned #ifndef uint8 #define uint8 unsigned int8 #endif #ifndef uint16 #define uint16 unsigned int16 #endif #ifndef uint32 #define uint32 unsigned int32 #endif #ifndef uint64 #define uint64 unsigned int64 #endif //Constants #define SPEED_PER_PWM 1 #define DISTANCE_PER_VALUE 1 #define TICKS_PER_CM 205.0f //#define TICKS_PER_CM 90.0f #define PI 3.14159265358979323846f #define CYCLES_PER_CORRECTION 20 #define EMPTY_FLOAT 81188.1484f #define WIRELESS_CODE "SPASS!" enum WirelessCommands { WLESS_CMD_CONFIRM, WLESS_CMD_RECIEVED_BALL, }; //IO Module Names enum IOModuleNames { //General IO_START, //Engines IO_ENGINE_START = IO_START, IO_ENGINE_DRIVE_LEFT = IO_ENGINE_START, IO_ENGINE_DRIVE_RIGHT, IO_ENGINE_DRIVE_BACK, IO_ENGINE_END, //Dribbler IO_DRIBBLER_START = IO_ENGINE_END, IO_DRIBBLER_MAIN = IO_DRIBBLER_START, IO_DRIBBLER_END, //Kicker IO_KICKER_START = IO_DRIBBLER_END, IO_KICKER_MAIN = IO_KICKER_START, IO_KICKER_END, // Aktuator IO_AKTUATOR_START = IO_KICKER_END, IO_AKTUATOR_MAIN = IO_AKTUATOR_START, IO_AKTUATOR_END, // Wireless IO_WIRELESS_START = IO_AKTUATOR_END, IO_WIRELESS_MAIN = IO_WIRELESS_START, IO_WIRELESS_END, //Sensors IO_SENSOR_START = IO_WIRELESS_END, IO_SENSOR_IR_0_DEG = IO_SENSOR_START, IO_SENSOR_IR_30_DEG, IO_SENSOR_IR_60_DEG, IO_SENSOR_IR_100_DEG, IO_SENSOR_IR_180_DEG, IO_SENSOR_IR_260_DEG, IO_SENSOR_IR_300_DEG, IO_SENSOR_IR_330_DEG, IO_SENSOR_DISTANCE_0_DEG, IO_SENSOR_DISTANCE_90_DEG, IO_SENSOR_DISTANCE_180_DEG, IO_SENSOR_DISTANCE_270_DEG, IO_SENSOR_MOUSE_LEFT, IO_SENSOR_MOUSE_RIGHT, IO_SENSOR_END, //Leds IO_LED_START = IO_SENSOR_END, IO_LED_MAIN = IO_LED_START, IO_LED_END, //Displays IO_DISPLAY_START = IO_LED_END, IO_DISPLAY_MAIN = IO_DISPLAY_START, IO_DISPLAY_END, //Keyboards IO_KEYBOARD_START = IO_DISPLAY_END, IO_KEYBOARD_MAIN = IO_KEYBOARD_START, IO_KEYBOARD_END, //Position Tracker IO_POSITION_TRACKER_START = IO_KEYBOARD_END, IO_POSITION_TRACKER_MAIN, IO_POSITION_TRACKER_END, //Position Tracker IO_BALL_TRACKER_START = IO_POSITION_TRACKER_END, IO_BALL_TRACKER_MAIN, IO_BALL_TRACKER_END, //Navigators IO_NAVIGATOR_START = IO_BALL_TRACKER_END, IO_NAVIGATOR_MAIN, IO_NAVIGATOR_END, //Logics IO_LOGIC_START = IO_NAVIGATOR_END, IO_LOGIC_MAIN, IO_LOGIC_END, //General IO_END = IO_NAVIGATOR_END, }; #endif