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( |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 32 | name = 'genrule_arm', |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 33 | visibility = ['//visibility:private'], |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 34 | cmd = '$(location //y2016/control_loops/python:arm) $(OUTS)', |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 35 | tools = [ |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 36 | '//y2016/control_loops/python:arm', |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 37 | ], |
| 38 | outs = [ |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 39 | 'arm_plant.h', |
| 40 | 'arm_plant.cc', |
| 41 | 'integral_arm_plant.h', |
| 42 | 'integral_arm_plant.cc', |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 43 | ], |
| 44 | ) |
| 45 | |
| 46 | cc_library( |
| 47 | name = 'superstructure_plants', |
| 48 | srcs = [ |
| 49 | 'intake_plant.cc', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 50 | 'arm_plant.cc', |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 51 | 'integral_intake_plant.cc', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 52 | 'integral_arm_plant.cc', |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 53 | ], |
| 54 | hdrs = [ |
| 55 | 'intake_plant.h', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 56 | 'arm_plant.h', |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 57 | 'integral_intake_plant.h', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 58 | 'integral_arm_plant.h', |
Comran Morshed | 2ae094e | 2016-01-23 20:43:20 +0000 | [diff] [blame] | 59 | ], |
| 60 | deps = [ |
| 61 | '//frc971/control_loops:state_feedback_loop', |
| 62 | ], |
| 63 | ) |
| 64 | |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 65 | cc_library( |
| 66 | name = 'superstructure_lib', |
| 67 | srcs = [ |
| 68 | 'superstructure.cc', |
Austin Schuh | 10c2d11 | 2016-02-14 13:42:28 -0800 | [diff] [blame] | 69 | 'superstructure_controls.cc', |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 70 | ], |
| 71 | hdrs = [ |
| 72 | 'superstructure.h', |
Austin Schuh | 10c2d11 | 2016-02-14 13:42:28 -0800 | [diff] [blame] | 73 | 'superstructure_controls.h', |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 74 | ], |
| 75 | deps = [ |
| 76 | ':superstructure_queue', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 77 | ':superstructure_plants', |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 78 | '//aos/common/controls:control_loop', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 79 | '//aos/common/util:trapezoid_profile', |
Austin Schuh | 2c71786 | 2016-03-13 15:32:53 -0700 | [diff] [blame] | 80 | '//aos/common:math', |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame^] | 81 | '//frc971/control_loops:profiled_subsystem', |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 82 | '//frc971/control_loops:simple_capped_state_feedback_loop', |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame^] | 83 | '//frc971/control_loops:state_feedback_loop', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 84 | '//frc971/zeroing', |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame^] | 85 | '//y2016/queues:ball_detector', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 86 | '//y2016:constants', |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 87 | ], |
| 88 | ) |
| 89 | |
| 90 | cc_test( |
| 91 | name = 'superstructure_lib_test', |
| 92 | srcs = [ |
| 93 | 'superstructure_lib_test.cc', |
| 94 | ], |
| 95 | deps = [ |
| 96 | ':superstructure_queue', |
| 97 | ':superstructure_lib', |
| 98 | '//aos/testing:googletest', |
| 99 | '//aos/common:queues', |
| 100 | '//aos/common/controls:control_loop_test', |
Austin Schuh | 2fc10fa | 2016-02-08 00:44:34 -0800 | [diff] [blame] | 101 | '//aos/common:math', |
| 102 | '//aos/common:time', |
| 103 | '//frc971/control_loops:position_sensor_sim', |
| 104 | '//frc971/control_loops:team_number_test_environment', |
Comran Morshed | 25f81a0 | 2016-01-23 13:40:10 +0000 | [diff] [blame] | 105 | ], |
| 106 | ) |
| 107 | |
| 108 | cc_binary( |
| 109 | name = 'superstructure', |
| 110 | srcs = [ |
| 111 | 'superstructure_main.cc', |
| 112 | ], |
| 113 | deps = [ |
| 114 | '//aos/linux_code:init', |
| 115 | ':superstructure_lib', |
| 116 | ':superstructure_queue', |
| 117 | ], |
| 118 | ) |