James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 1 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
James Kuszmaul | 9f2f53c | 2023-02-19 14:08:18 -0800 | [diff] [blame] | 2 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
| 3 | |
Austin Schuh | 18cb1df | 2023-01-28 11:13:35 -0800 | [diff] [blame] | 4 | cc_library( |
| 5 | name = "imu", |
| 6 | srcs = [ |
| 7 | "imu.cc", |
| 8 | ], |
| 9 | hdrs = [ |
| 10 | "imu.h", |
| 11 | ], |
| 12 | target_compatible_with = ["@platforms//os:linux"], |
| 13 | visibility = ["//visibility:public"], |
| 14 | deps = [ |
| 15 | "//aos/events:epoll", |
| 16 | "//aos/events:shm_event_loop", |
| 17 | "//aos/util:crc32", |
| 18 | "//frc971/wpilib:imu_batch_fbs", |
| 19 | "//frc971/wpilib:imu_fbs", |
Austin Schuh | 18cb1df | 2023-01-28 11:13:35 -0800 | [diff] [blame] | 20 | "@com_github_google_glog//:glog", |
| 21 | "@com_google_absl//absl/types:span", |
| 22 | ], |
| 23 | ) |
James Kuszmaul | 9f2f53c | 2023-02-19 14:08:18 -0800 | [diff] [blame] | 24 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 25 | static_flatbuffer( |
James Kuszmaul | 9f2f53c | 2023-02-19 14:08:18 -0800 | [diff] [blame] | 26 | name = "imu_failures_fbs", |
| 27 | srcs = [ |
| 28 | "imu_failures.fbs", |
| 29 | ], |
| 30 | visibility = ["//visibility:public"], |
| 31 | ) |
| 32 | |
| 33 | flatbuffer_ts_library( |
| 34 | name = "imu_failures_ts_fbs", |
| 35 | srcs = [ |
| 36 | "imu_failures.fbs", |
| 37 | ], |
| 38 | visibility = ["//visibility:public"], |
| 39 | ) |
| 40 | |
| 41 | cc_library( |
| 42 | name = "imu_watcher", |
| 43 | srcs = ["imu_watcher.cc"], |
| 44 | hdrs = ["imu_watcher.h"], |
| 45 | visibility = ["//visibility:public"], |
| 46 | deps = [ |
| 47 | ":imu_failures_fbs", |
| 48 | "//aos/events:event_loop", |
| 49 | "//frc971/control_loops/drivetrain:drivetrain_config", |
| 50 | "//frc971/wpilib:imu_batch_fbs", |
| 51 | "//frc971/zeroing:imu_zeroer", |
| 52 | "//frc971/zeroing:wrap", |
| 53 | ], |
| 54 | ) |