Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 1 | package(default_visibility = ['//visibility:public']) |
| 2 | |
| 3 | load('/aos/build/queues', 'queue_library') |
| 4 | |
| 5 | queue_library( |
| 6 | name = 'superstructure_queue', |
| 7 | srcs = [ |
| 8 | 'superstructure.q', |
| 9 | ], |
| 10 | deps = [ |
| 11 | '//aos/common/controls:control_loop_queues', |
| 12 | '//frc971/control_loops:queues', |
| 13 | ], |
| 14 | ) |
| 15 | |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame^] | 16 | genrule( |
| 17 | name = 'genrule_intake', |
| 18 | visibility = ['//visibility:private'], |
| 19 | cmd = '$(location //y2016/control_loops/python:intake) $(OUTS)', |
| 20 | tools = [ |
| 21 | '//y2016/control_loops/python:intake', |
| 22 | ], |
| 23 | outs = [ |
| 24 | 'intake_plant.h', |
| 25 | 'intake_plant.cc', |
| 26 | 'integral_intake_plant.h', |
| 27 | 'integral_intake_plant.cc', |
| 28 | ], |
| 29 | ) |
| 30 | |
| 31 | genrule( |
| 32 | name = 'genrule_shoulder', |
| 33 | visibility = ['//visibility:private'], |
| 34 | cmd = '$(location //y2016/control_loops/python:shoulder) $(OUTS)', |
| 35 | tools = [ |
| 36 | '//y2016/control_loops/python:shoulder', |
| 37 | ], |
| 38 | outs = [ |
| 39 | 'shoulder_plant.h', |
| 40 | 'shoulder_plant.cc', |
| 41 | 'integral_shoulder_plant.h', |
| 42 | 'integral_shoulder_plant.cc', |
| 43 | ], |
| 44 | ) |
| 45 | |
| 46 | genrule( |
| 47 | name = 'genrule_wrist', |
| 48 | visibility = ['//visibility:private'], |
| 49 | cmd = '$(location //y2016/control_loops/python:wrist) $(OUTS)', |
| 50 | tools = [ |
| 51 | '//y2016/control_loops/python:wrist', |
| 52 | ], |
| 53 | outs = [ |
| 54 | 'wrist_plant.h', |
| 55 | 'wrist_plant.cc', |
| 56 | 'integral_wrist_plant.h', |
| 57 | 'integral_wrist_plant.cc', |
| 58 | ], |
| 59 | ) |
| 60 | |
| 61 | cc_library( |
| 62 | name = 'superstructure_plants', |
| 63 | srcs = [ |
| 64 | 'intake_plant.cc', |
| 65 | 'shoulder_plant.cc', |
| 66 | 'wrist_plant.cc', |
| 67 | 'integral_intake_plant.cc', |
| 68 | 'integral_shoulder_plant.cc', |
| 69 | 'integral_wrist_plant.cc', |
| 70 | ], |
| 71 | hdrs = [ |
| 72 | 'intake_plant.h', |
| 73 | 'shoulder_plant.h', |
| 74 | 'wrist_plant.h', |
| 75 | 'integral_intake_plant.h', |
| 76 | 'integral_shoulder_plant.h', |
| 77 | 'integral_wrist_plant.h', |
| 78 | ], |
| 79 | deps = [ |
| 80 | '//frc971/control_loops:state_feedback_loop', |
| 81 | ], |
| 82 | ) |
| 83 | |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 84 | cc_library( |
| 85 | name = 'superstructure_lib', |
| 86 | srcs = [ |
| 87 | 'superstructure.cc', |
| 88 | ], |
| 89 | hdrs = [ |
| 90 | 'superstructure.h', |
| 91 | ], |
| 92 | deps = [ |
| 93 | ':superstructure_queue', |
| 94 | '//aos/common/controls:control_loop', |
| 95 | '//frc971/control_loops:state_feedback_loop', |
| 96 | ], |
| 97 | ) |
| 98 | |
| 99 | cc_test( |
| 100 | name = 'superstructure_lib_test', |
| 101 | srcs = [ |
| 102 | 'superstructure_lib_test.cc', |
| 103 | ], |
| 104 | deps = [ |
| 105 | ':superstructure_queue', |
| 106 | ':superstructure_lib', |
| 107 | '//aos/testing:googletest', |
| 108 | '//aos/common:queues', |
| 109 | '//aos/common/controls:control_loop_test', |
| 110 | ], |
| 111 | ) |
| 112 | |
| 113 | cc_binary( |
| 114 | name = 'superstructure', |
| 115 | srcs = [ |
| 116 | 'superstructure_main.cc', |
| 117 | ], |
| 118 | deps = [ |
| 119 | '//aos/linux_code:init', |
| 120 | ':superstructure_lib', |
| 121 | ':superstructure_queue', |
| 122 | ], |
| 123 | ) |