Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 2 | |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 3 | load("//aos/build:queues.bzl", "queue_library") |
| 4 | load("//tools:environments.bzl", "mcu_cpus") |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 5 | |
| 6 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 7 | name = "replay_control_loop", |
| 8 | hdrs = [ |
| 9 | "replay_control_loop.h", |
| 10 | ], |
| 11 | deps = [ |
| 12 | ":control_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 13 | "//aos:queues", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 14 | "//aos/logging:queue_logging", |
| 15 | "//aos/logging:replay", |
Austin Schuh | 2001aa4 | 2018-10-29 22:57:02 -0700 | [diff] [blame] | 16 | "//aos/time", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 17 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 18 | ) |
| 19 | |
| 20 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 21 | name = "control_loop_test", |
| 22 | testonly = True, |
| 23 | srcs = [ |
| 24 | "control_loop_test.cc", |
| 25 | ], |
| 26 | hdrs = [ |
| 27 | "control_loop_test.h", |
| 28 | ], |
| 29 | deps = [ |
Austin Schuh | 9fe68f7 | 2019-08-10 19:32:03 -0700 | [diff] [blame^] | 30 | "//aos/events:simulated_event_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 31 | "//aos/logging:queue_logging", |
Austin Schuh | 2001aa4 | 2018-10-29 22:57:02 -0700 | [diff] [blame] | 32 | "//aos/robot_state", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 33 | "//aos/testing:googletest", |
| 34 | "//aos/testing:test_shm", |
Austin Schuh | 2001aa4 | 2018-10-29 22:57:02 -0700 | [diff] [blame] | 35 | "//aos/time", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 36 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 37 | ) |
| 38 | |
| 39 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 40 | name = "polytope_uc", |
| 41 | hdrs = [ |
| 42 | "polytope.h", |
| 43 | ], |
| 44 | restricted_to = mcu_cpus, |
| 45 | deps = [ |
| 46 | "//third_party/eigen", |
| 47 | ], |
| 48 | ) |
| 49 | |
| 50 | cc_library( |
| 51 | name = "polytope", |
| 52 | hdrs = [ |
| 53 | "polytope.h", |
| 54 | ], |
| 55 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 56 | "//aos/logging", |
| 57 | "//aos/logging:matrix_logging", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 58 | "//third_party/cddlib", |
| 59 | "//third_party/eigen", |
| 60 | ], |
Brian Silverman | aba7bf6 | 2016-01-31 18:03:59 -0500 | [diff] [blame] | 61 | ) |
| 62 | |
| 63 | cc_test( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 64 | name = "polytope_test", |
| 65 | srcs = [ |
| 66 | "polytope_test.cc", |
| 67 | ], |
| 68 | deps = [ |
| 69 | ":polytope", |
| 70 | "//aos/testing:googletest", |
| 71 | "//aos/testing:test_logging", |
| 72 | "//third_party/eigen", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 73 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 74 | ) |
| 75 | |
| 76 | queue_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 77 | name = "control_loop_queues", |
| 78 | srcs = [ |
| 79 | "control_loops.q", |
| 80 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 81 | ) |
| 82 | |
| 83 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 84 | name = "control_loop", |
| 85 | srcs = [ |
| 86 | "control_loop.cc", |
| 87 | "control_loop-tmpl.h", |
| 88 | ], |
| 89 | hdrs = [ |
| 90 | "control_loop.h", |
| 91 | ], |
| 92 | deps = [ |
| 93 | ":control_loop_queues", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 94 | "//aos:queues", |
Austin Schuh | a1654ed | 2019-01-27 17:24:54 -0800 | [diff] [blame] | 95 | "//aos/events:event-loop", |
| 96 | "//aos/events:shm-event-loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 97 | "//aos/logging", |
| 98 | "//aos/logging:queue_logging", |
Austin Schuh | 2001aa4 | 2018-10-29 22:57:02 -0700 | [diff] [blame] | 99 | "//aos/robot_state", |
| 100 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 101 | "//aos/util:log_interval", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 102 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 103 | ) |