James Kuszmaul | 9f2f53c | 2023-02-19 14:08:18 -0800 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 2 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
James Kuszmaul | 9f2f53c | 2023-02-19 14:08:18 -0800 | [diff] [blame] | 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 | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 20 | "@com_google_absl//absl/log", |
| 21 | "@com_google_absl//absl/log:check", |
Austin Schuh | 18cb1df | 2023-01-28 11:13:35 -0800 | [diff] [blame] | 22 | "@com_google_absl//absl/types:span", |
| 23 | ], |
| 24 | ) |
James Kuszmaul | 9f2f53c | 2023-02-19 14:08:18 -0800 | [diff] [blame] | 25 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 26 | static_flatbuffer( |
James Kuszmaul | 9f2f53c | 2023-02-19 14:08:18 -0800 | [diff] [blame] | 27 | name = "imu_failures_fbs", |
| 28 | srcs = [ |
| 29 | "imu_failures.fbs", |
| 30 | ], |
| 31 | visibility = ["//visibility:public"], |
| 32 | ) |
| 33 | |
| 34 | flatbuffer_ts_library( |
| 35 | name = "imu_failures_ts_fbs", |
| 36 | srcs = [ |
| 37 | "imu_failures.fbs", |
| 38 | ], |
| 39 | visibility = ["//visibility:public"], |
| 40 | ) |
| 41 | |
| 42 | cc_library( |
| 43 | name = "imu_watcher", |
| 44 | srcs = ["imu_watcher.cc"], |
| 45 | hdrs = ["imu_watcher.h"], |
| 46 | visibility = ["//visibility:public"], |
| 47 | deps = [ |
| 48 | ":imu_failures_fbs", |
| 49 | "//aos/events:event_loop", |
| 50 | "//frc971/control_loops/drivetrain:drivetrain_config", |
| 51 | "//frc971/wpilib:imu_batch_fbs", |
| 52 | "//frc971/zeroing:imu_zeroer", |
| 53 | "//frc971/zeroing:wrap", |
| 54 | ], |
| 55 | ) |