forked from rbmj/612-code
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path612.h
79 lines (64 loc) · 2.07 KB
/
612.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* 612.h
*
* Copyright (c) 2011, 2012 Chantilly Robotics <[email protected]>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Project-Wide defines!
*/
#ifndef INC_612_H
#define INC_612_H
#include <vxWorks.h>
#include <taskLib.h>
#ifndef TASKARG_T_DEFINED // defined in frc-cpp-sim, not defined for actual robot
#ifdef __x86_64__
typedef UINT64 taskarg_t;
#else
typedef UINT32 taskarg_t;
#endif
#define TASKARG_T_DEFINED
#endif
/*const double SHOOT_KEY_FREQ = 73.0
const double SHOOT_KEY_ANGLE = */
typedef UINT32 state_t;
typedef UINT8 module_t;
typedef UINT8 range_t;
enum GLOBAL_ROBOT_STATE {
STATE_DRIVING = 0,
STATE_SHOOTING = 1
};
void perror_612_(const char*, int, const char *);
//need to use a #define here in order to have __FILE__/__LINE__ work
#define perror_612(sym) perror_612_(__FILE__, __LINE__, sym)
//need to use a #define here - use 1/0 not true/false to allow #if usage.
//debug mode
#define DEBUG_612 (1)
//non-debug mode
//#defind DEBUG_612 (0)
//use target identification heuristic
//#define VISION_ALT_HEURISTIC
//use ad-hoc target height detection
#define VISION_ALT_ADHOC
//calculate trajectory with fixed exit speed
//#define TRAJECTORY_LAUNCHSPEED
//calculate trajectory with fixed entry angle
#define TRAJECTORY_ENTRYANGLE
#define USE_CANBUS
//#define USE_JAGUARPWM
#ifdef USE_JAGUARPWM
#define SPEEDCONTROLLER Jaguar
#else
#define SPEEDCONTROLLER CANJaguar
#endif
#endif