blob: 9dcd85d88990074f3e6513bfa96c5a54902fa00c [file] [log] [blame]
milind-u086d7262022-01-19 20:44:18 -08001load("//frc971:downloader.bzl", "robot_downloader")
2load("//aos:config.bzl", "aos_config")
3
4robot_downloader(
5 data = [
6 ":config",
7 ],
8 start_binaries = [
9 ":joystick_reader",
10 ":wpilib_interface",
11 "//y2022/control_loops/drivetrain:drivetrain",
12 "//y2022/control_loops/superstructure:superstructure",
13 "//y2022/actors:binaries",
14 ],
15)
16
milind-u6b6e1002022-01-22 13:26:42 -080017robot_downloader(
18 name = "pi_download",
19 binaries = [
20 "//y2022/vision:viewer",
21 ],
22 data = [
23 ":config",
24 ],
25 dirs = [
26 ],
27 start_binaries = [
28 "//aos/events/logging:logger_main",
29 "//aos/network:message_bridge_client",
30 "//aos/network:message_bridge_server",
31 "//aos/network:web_proxy_main",
32 "//y2022/vision:camera_reader",
33 ],
34 target_compatible_with = ["//tools/platforms/hardware:raspberry_pi"],
35 target_type = "pi",
36)
37
milind-u086d7262022-01-19 20:44:18 -080038cc_library(
39 name = "constants",
40 srcs = [
41 "constants.cc",
42 ],
43 hdrs = [
44 "constants.h",
45 ],
46 visibility = ["//visibility:public"],
47 deps = [
48 "//aos/mutex",
49 "//aos/network:team_number",
50 "//frc971:constants",
51 "//frc971/control_loops:pose",
52 "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem",
53 "//y2022/control_loops/drivetrain:polydrivetrain_plants",
54 "@com_github_google_glog//:glog",
55 "@com_google_absl//absl/base",
56 ],
57)
58
59cc_binary(
60 name = "wpilib_interface",
61 srcs = [
62 "wpilib_interface.cc",
63 ],
64 target_compatible_with = ["//tools/platforms/hardware:roborio"],
65 deps = [
66 ":constants",
67 "//aos:init",
68 "//aos:math",
69 "//aos/events:shm_event_loop",
70 "//aos/logging",
71 "//aos/stl_mutex",
72 "//aos/time",
73 "//aos/util:log_interval",
74 "//aos/util:phased_loop",
75 "//aos/util:wrapping_counter",
76 "//frc971/autonomous:auto_mode_fbs",
77 "//frc971/control_loops:control_loop",
78 "//frc971/control_loops:control_loops_fbs",
79 "//frc971/control_loops/drivetrain:drivetrain_position_fbs",
80 "//frc971/input:robot_state_fbs",
81 "//frc971/wpilib:ADIS16448",
82 "//frc971/wpilib:buffered_pcm",
83 "//frc971/wpilib:drivetrain_writer",
84 "//frc971/wpilib:encoder_and_potentiometer",
85 "//frc971/wpilib:interrupt_edge_counting",
86 "//frc971/wpilib:joystick_sender",
87 "//frc971/wpilib:logging_fbs",
88 "//frc971/wpilib:loop_output_handler",
89 "//frc971/wpilib:pdp_fetcher",
90 "//frc971/wpilib:sensor_reader",
91 "//frc971/wpilib:wpilib_interface",
92 "//frc971/wpilib:wpilib_robot_base",
93 "//third_party:phoenix",
94 "//third_party:wpilib",
95 "//y2022/control_loops/superstructure:superstructure_output_fbs",
96 "//y2022/control_loops/superstructure:superstructure_position_fbs",
97 ],
98)
99
100cc_binary(
101 name = "joystick_reader",
102 srcs = [
103 ":joystick_reader.cc",
104 ],
105 deps = [
106 "//aos:init",
107 "//aos/actions:action_lib",
108 "//aos/logging",
109 "//frc971/autonomous:auto_fbs",
110 "//frc971/autonomous:base_autonomous_actor",
111 "//frc971/control_loops:profiled_subsystem_fbs",
112 "//frc971/input:action_joystick_input",
113 "//frc971/input:drivetrain_input",
114 "//frc971/input:joystick_input",
115 "//y2022/control_loops/drivetrain:drivetrain_base",
116 "//y2022/control_loops/superstructure:superstructure_goal_fbs",
117 "//y2022/control_loops/superstructure:superstructure_status_fbs",
118 ],
119)
120
121aos_config(
122 name = "config",
123 src = "y2022.json",
124 flatbuffers = [
125 "//y2022/control_loops/superstructure:superstructure_goal_fbs",
126 "//y2022/control_loops/superstructure:superstructure_output_fbs",
127 "//y2022/control_loops/superstructure:superstructure_position_fbs",
128 "//y2022/control_loops/superstructure:superstructure_status_fbs",
129 ],
130 visibility = ["//visibility:public"],
131 deps = [
132 "//frc971/autonomous:config",
133 "//frc971/control_loops/drivetrain:config",
134 "//frc971/input:config",
135 "//frc971/wpilib:config",
136 ],
137)