blob: c45a3450635b2e1d28d4f8c4607b9f7942e4c5f8 [file] [log] [blame]
Austin Schuhbcce26a2018-03-26 23:41:24 -07001package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04002
Alex Perrycb7da4b2019-08-28 19:35:56 -07003load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
Austin Schuhbcce26a2018-03-26 23:41:24 -07004load("//tools:environments.bzl", "mcu_cpus")
Brian Silverman100534c2015-09-07 15:51:23 -04005
6cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -07007 name = "control_loop_test",
8 testonly = True,
9 srcs = [
10 "control_loop_test.cc",
11 ],
12 hdrs = [
13 "control_loop_test.h",
14 ],
15 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070016 "//aos:flatbuffers",
17 "//aos:json_to_flatbuffer",
Austin Schuh9fe68f72019-08-10 19:32:03 -070018 "//aos/events:simulated_event_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -070019 "//aos/robot_state:joystick_state_fbs",
20 "//aos/robot_state:robot_state_fbs",
Austin Schuhbcce26a2018-03-26 23:41:24 -070021 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -070022 "//aos/testing:test_logging",
Austin Schuh2001aa42018-10-29 22:57:02 -070023 "//aos/time",
Austin Schuhbcce26a2018-03-26 23:41:24 -070024 ],
Brian Silverman100534c2015-09-07 15:51:23 -040025)
26
27cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070028 name = "polytope_uc",
29 hdrs = [
30 "polytope.h",
31 ],
32 restricted_to = mcu_cpus,
33 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070034 "@org_tuxfamily_eigen//:eigen",
Austin Schuhbcce26a2018-03-26 23:41:24 -070035 ],
36)
37
38cc_library(
39 name = "polytope",
40 hdrs = [
41 "polytope.h",
42 ],
43 deps = [
John Park33858a32018-09-28 23:05:48 -070044 "//aos/logging",
Austin Schuhbcce26a2018-03-26 23:41:24 -070045 "//third_party/cddlib",
Alex Perrycb7da4b2019-08-28 19:35:56 -070046 "@com_github_google_glog//:glog",
47 "@org_tuxfamily_eigen//:eigen",
Austin Schuhbcce26a2018-03-26 23:41:24 -070048 ],
Brian Silvermanaba7bf62016-01-31 18:03:59 -050049)
50
51cc_test(
Austin Schuhbcce26a2018-03-26 23:41:24 -070052 name = "polytope_test",
53 srcs = [
54 "polytope_test.cc",
55 ],
56 deps = [
57 ":polytope",
58 "//aos/testing:googletest",
59 "//aos/testing:test_logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070060 "@org_tuxfamily_eigen//:eigen",
Austin Schuhbcce26a2018-03-26 23:41:24 -070061 ],
Brian Silverman100534c2015-09-07 15:51:23 -040062)
63
Alex Perrycb7da4b2019-08-28 19:35:56 -070064flatbuffer_cc_library(
65 name = "control_loop_fbs",
Austin Schuhbcce26a2018-03-26 23:41:24 -070066 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070067 "control_loops.fbs",
Austin Schuhbcce26a2018-03-26 23:41:24 -070068 ],
Brian Silverman100534c2015-09-07 15:51:23 -040069)
70
71cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070072 name = "control_loop",
73 srcs = [
74 "control_loop.cc",
75 "control_loop-tmpl.h",
76 ],
77 hdrs = [
78 "control_loop.h",
79 ],
80 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -070081 "//aos/events:event_loop",
82 "//aos/events:shm_event_loop",
John Park33858a32018-09-28 23:05:48 -070083 "//aos/logging",
Alex Perrycb7da4b2019-08-28 19:35:56 -070084 "//aos/robot_state:joystick_state_fbs",
85 "//aos/robot_state:robot_state_fbs",
Austin Schuh2001aa42018-10-29 22:57:02 -070086 "//aos/time",
John Park33858a32018-09-28 23:05:48 -070087 "//aos/util:log_interval",
Austin Schuhbcce26a2018-03-26 23:41:24 -070088 ],
Brian Silverman100534c2015-09-07 15:51:23 -040089)