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