Provide utilities for convenient plotting of channels
Implement a set of utilities (along with basic examples) to
make it so that we can readily make plots of individual channels
from logfiles (or live on the robot).
Change-Id: Ic648c9ccb9dcb73419dc2c8c4c395fdea0536110
diff --git a/frc971/wpilib/BUILD b/frc971/wpilib/BUILD
index e7c52bf..087c413 100644
--- a/frc971/wpilib/BUILD
+++ b/frc971/wpilib/BUILD
@@ -1,6 +1,7 @@
package(default_visibility = ["//visibility:public"])
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+load("@npm_bazel_typescript//:defs.bzl", "ts_library")
+load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
load("//aos:config.bzl", "aos_config")
flatbuffer_cc_library(
@@ -286,6 +287,15 @@
target_compatible_with = ["@platforms//os:linux"],
)
+flatbuffer_ts_library(
+ name = "imu_batch_ts_fbs",
+ srcs = ["imu_batch.fbs"],
+ includes = [
+ ":imu_fbs_includes",
+ ],
+ target_compatible_with = ["@platforms//os:linux"],
+)
+
cc_library(
name = "ADIS16470",
srcs = [
@@ -422,3 +432,27 @@
"@com_github_google_glog//:glog",
],
)
+
+ts_library(
+ name = "imu_plot_utils",
+ srcs = ["imu_plot_utils.ts"],
+ target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":imu_batch_ts_fbs",
+ "//aos:configuration_ts_fbs",
+ "//aos/network/www:aos_plotter",
+ "//aos/network/www:reflection_ts",
+ "@com_github_google_flatbuffers//ts:flatbuffers_ts",
+ ],
+)
+
+ts_library(
+ name = "imu_plotter",
+ srcs = ["imu_plotter.ts"],
+ target_compatible_with = ["@platforms//os:linux"],
+ deps = [
+ ":imu_plot_utils",
+ "//aos/network/www:aos_plotter",
+ "//aos/network/www:proxy",
+ ],
+)