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 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 3 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 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 = "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 Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 16 | "//aos:flatbuffers", |
| 17 | "//aos:json_to_flatbuffer", |
Austin Schuh | 9fe68f7 | 2019-08-10 19:32:03 -0700 | [diff] [blame] | 18 | "//aos/events:simulated_event_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 19 | "//aos/robot_state:joystick_state_fbs", |
| 20 | "//aos/robot_state:robot_state_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 21 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 22 | "//aos/testing:test_logging", |
Austin Schuh | 2001aa4 | 2018-10-29 22:57:02 -0700 | [diff] [blame] | 23 | "//aos/time", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 24 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 25 | ) |
| 26 | |
| 27 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 28 | name = "polytope_uc", |
| 29 | hdrs = [ |
| 30 | "polytope.h", |
| 31 | ], |
| 32 | restricted_to = mcu_cpus, |
| 33 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 34 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 35 | ], |
| 36 | ) |
| 37 | |
| 38 | cc_library( |
| 39 | name = "polytope", |
| 40 | hdrs = [ |
| 41 | "polytope.h", |
| 42 | ], |
| 43 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 44 | "//aos/logging", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 45 | "//third_party/cddlib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 46 | "@com_github_google_glog//:glog", |
| 47 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 48 | ], |
Brian Silverman | aba7bf6 | 2016-01-31 18:03:59 -0500 | [diff] [blame] | 49 | ) |
| 50 | |
| 51 | cc_test( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 52 | name = "polytope_test", |
| 53 | srcs = [ |
| 54 | "polytope_test.cc", |
| 55 | ], |
| 56 | deps = [ |
| 57 | ":polytope", |
| 58 | "//aos/testing:googletest", |
| 59 | "//aos/testing:test_logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 60 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 61 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 62 | ) |
| 63 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 64 | flatbuffer_cc_library( |
| 65 | name = "control_loop_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 66 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 67 | "control_loops.fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 68 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 69 | ) |
| 70 | |
| 71 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 72 | 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 Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 81 | "//aos/events:event_loop", |
| 82 | "//aos/events:shm_event_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 83 | "//aos/logging", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame^] | 84 | "//aos/robot_state:joystick_state_fbs", |
| 85 | "//aos/robot_state:robot_state_fbs", |
Austin Schuh | 2001aa4 | 2018-10-29 22:57:02 -0700 | [diff] [blame] | 86 | "//aos/time", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 87 | "//aos/util:log_interval", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 88 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 89 | ) |