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