Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
| 2 | |
| 3 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
| 4 | |
| 5 | flatbuffer_cc_library( |
| 6 | name = "superstructure_goal_fbs", |
| 7 | srcs = [ |
| 8 | "superstructure_goal.fbs", |
| 9 | ], |
| 10 | gen_reflections = 1, |
| 11 | includes = [ |
| 12 | "//frc971/control_loops:control_loops_fbs_includes", |
| 13 | "//frc971/control_loops:profiled_subsystem_fbs_includes", |
| 14 | ], |
| 15 | ) |
| 16 | |
| 17 | flatbuffer_cc_library( |
| 18 | name = "superstructure_output_fbs", |
| 19 | srcs = [ |
| 20 | "superstructure_output.fbs", |
| 21 | ], |
| 22 | gen_reflections = 1, |
| 23 | ) |
| 24 | |
| 25 | flatbuffer_cc_library( |
| 26 | name = "superstructure_status_fbs", |
| 27 | srcs = [ |
| 28 | "superstructure_status.fbs", |
| 29 | ], |
| 30 | gen_reflections = 1, |
| 31 | includes = [ |
| 32 | "//frc971/control_loops:control_loops_fbs_includes", |
| 33 | "//frc971/control_loops:profiled_subsystem_fbs_includes", |
| 34 | ], |
| 35 | ) |
| 36 | |
| 37 | flatbuffer_cc_library( |
| 38 | name = "superstructure_position_fbs", |
| 39 | srcs = [ |
| 40 | "superstructure_position.fbs", |
| 41 | ], |
| 42 | gen_reflections = 1, |
| 43 | includes = [ |
| 44 | "//frc971/control_loops:control_loops_fbs_includes", |
| 45 | "//frc971/control_loops:profiled_subsystem_fbs_includes", |
| 46 | ], |
| 47 | ) |
| 48 | |
| 49 | cc_library( |
| 50 | name = "superstructure_lib", |
| 51 | srcs = [ |
| 52 | "superstructure.cc", |
| 53 | ], |
| 54 | hdrs = [ |
| 55 | "superstructure.h", |
| 56 | ], |
| 57 | deps = [ |
John Park | 0a245a0 | 2020-02-02 14:10:15 -0800 | [diff] [blame] | 58 | ":climber", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 59 | ":superstructure_goal_fbs", |
| 60 | ":superstructure_output_fbs", |
| 61 | ":superstructure_position_fbs", |
| 62 | ":superstructure_status_fbs", |
| 63 | "//aos/controls:control_loop", |
| 64 | "//aos/events:event_loop", |
James Kuszmaul | b1b2d8e | 2020-02-21 21:11:46 -0800 | [diff] [blame] | 65 | "//frc971/control_loops:control_loops_fbs", |
| 66 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 67 | "//y2020:constants", |
Sabina Davis | 0f31d3f | 2020-02-20 20:41:00 -0800 | [diff] [blame] | 68 | "//y2020/control_loops/superstructure/shooter", |
James Kuszmaul | b1b2d8e | 2020-02-21 21:11:46 -0800 | [diff] [blame] | 69 | "//y2020/control_loops/superstructure/turret:aiming", |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 70 | ], |
| 71 | ) |
| 72 | |
| 73 | cc_binary( |
| 74 | name = "superstructure", |
| 75 | srcs = [ |
| 76 | "superstructure_main.cc", |
| 77 | ], |
| 78 | deps = [ |
| 79 | ":superstructure_lib", |
| 80 | "//aos:init", |
| 81 | "//aos/events:shm_event_loop", |
| 82 | ], |
| 83 | ) |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 84 | |
| 85 | cc_test( |
| 86 | name = "superstructure_lib_test", |
| 87 | srcs = [ |
| 88 | "superstructure_lib_test.cc", |
| 89 | ], |
| 90 | data = [ |
| 91 | "//y2020:config.json", |
| 92 | ], |
| 93 | deps = [ |
| 94 | ":superstructure_goal_fbs", |
| 95 | ":superstructure_lib", |
| 96 | ":superstructure_output_fbs", |
| 97 | ":superstructure_position_fbs", |
| 98 | ":superstructure_status_fbs", |
| 99 | "//aos:math", |
| 100 | "//aos/controls:control_loop_test", |
Austin Schuh | 3290c63 | 2020-02-20 20:07:33 -0800 | [diff] [blame] | 101 | "//aos/events/logging:logger", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 102 | "//aos/testing:googletest", |
| 103 | "//aos/time", |
| 104 | "//frc971/control_loops:capped_test_plant", |
| 105 | "//frc971/control_loops:position_sensor_sim", |
| 106 | "//frc971/control_loops:team_number_test_environment", |
| 107 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
| 108 | "//y2020/control_loops/superstructure/hood:hood_plants", |
Sabina Davis | 0f2d38c | 2020-02-08 17:01:21 -0800 | [diff] [blame] | 109 | "//y2020/control_loops/superstructure/intake:intake_plants", |
Sabina Davis | 0f31d3f | 2020-02-20 20:41:00 -0800 | [diff] [blame] | 110 | "//y2020/control_loops/superstructure/shooter:shooter_plants", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 111 | ], |
| 112 | ) |
John Park | 0a245a0 | 2020-02-02 14:10:15 -0800 | [diff] [blame] | 113 | |
| 114 | cc_library( |
| 115 | name = "climber", |
| 116 | srcs = [ |
| 117 | "climber.cc", |
| 118 | ], |
| 119 | hdrs = [ |
| 120 | "climber.h", |
| 121 | ], |
| 122 | deps = [ |
| 123 | ":superstructure_goal_fbs", |
| 124 | ":superstructure_output_fbs", |
| 125 | "//aos/controls:control_loop", |
| 126 | "//frc971/control_loops:control_loops_fbs", |
| 127 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 128 | ], |
| 129 | ) |