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", |
| 65 | "//y2020:constants", |
| 66 | ], |
| 67 | ) |
| 68 | |
| 69 | cc_binary( |
| 70 | name = "superstructure", |
| 71 | srcs = [ |
| 72 | "superstructure_main.cc", |
| 73 | ], |
| 74 | deps = [ |
| 75 | ":superstructure_lib", |
| 76 | "//aos:init", |
| 77 | "//aos/events:shm_event_loop", |
| 78 | ], |
| 79 | ) |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 80 | |
| 81 | cc_test( |
| 82 | name = "superstructure_lib_test", |
| 83 | srcs = [ |
| 84 | "superstructure_lib_test.cc", |
| 85 | ], |
| 86 | data = [ |
| 87 | "//y2020:config.json", |
| 88 | ], |
| 89 | deps = [ |
| 90 | ":superstructure_goal_fbs", |
| 91 | ":superstructure_lib", |
| 92 | ":superstructure_output_fbs", |
| 93 | ":superstructure_position_fbs", |
| 94 | ":superstructure_status_fbs", |
| 95 | "//aos:math", |
| 96 | "//aos/controls:control_loop_test", |
Austin Schuh | 3290c63 | 2020-02-20 20:07:33 -0800 | [diff] [blame^] | 97 | "//aos/events/logging:logger", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 98 | "//aos/testing:googletest", |
| 99 | "//aos/time", |
| 100 | "//frc971/control_loops:capped_test_plant", |
| 101 | "//frc971/control_loops:position_sensor_sim", |
| 102 | "//frc971/control_loops:team_number_test_environment", |
| 103 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
| 104 | "//y2020/control_loops/superstructure/hood:hood_plants", |
Sabina Davis | 0f2d38c | 2020-02-08 17:01:21 -0800 | [diff] [blame] | 105 | "//y2020/control_loops/superstructure/intake:intake_plants", |
Sabina Davis | 7704a65 | 2020-02-01 11:42:14 -0800 | [diff] [blame] | 106 | ], |
| 107 | ) |
John Park | 0a245a0 | 2020-02-02 14:10:15 -0800 | [diff] [blame] | 108 | |
| 109 | cc_library( |
| 110 | name = "climber", |
| 111 | srcs = [ |
| 112 | "climber.cc", |
| 113 | ], |
| 114 | hdrs = [ |
| 115 | "climber.h", |
| 116 | ], |
| 117 | deps = [ |
| 118 | ":superstructure_goal_fbs", |
| 119 | ":superstructure_output_fbs", |
| 120 | "//aos/controls:control_loop", |
| 121 | "//frc971/control_loops:control_loops_fbs", |
| 122 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 123 | ], |
| 124 | ) |