blob: 360ecc250d8bc40709aad82478cbebbf4709f7c1 [file] [log] [blame]
James Kuszmauld67f6d22023-02-05 17:37:25 -08001load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
2load("//tools/build_rules:template.bzl", "jinja2_template")
3
4cc_library(
5 name = "simulated_constants_sender",
6 testonly = True,
7 srcs = ["simulated_constants_sender.h"],
8 hdrs = ["simulated_constants_sender.cc"],
9 deps = [
10 ":constants_fbs",
11 ":constants_list_fbs",
12 "//aos/events:simulated_event_loop",
13 "//aos/testing:path",
14 "//frc971/constants:constants_sender_lib",
15 ],
16)
17
18jinja2_template(
19 name = "constants.json",
20 src = "constants.jinja2.json",
21 includes = ["//y2023/vision/calib_files"] + ["7971.json"],
22 parameters = {},
23 visibility = ["//visibility:public"],
24)
25
26flatbuffer_cc_library(
27 name = "constants_fbs",
28 srcs = ["constants.fbs"],
29 gen_reflections = True,
30 visibility = ["//visibility:public"],
31 deps = ["//frc971/vision:calibration_fbs"],
32)
33
34flatbuffer_cc_library(
35 name = "constants_list_fbs",
36 srcs = ["constants_list.fbs"],
37 gen_reflections = True,
38 visibility = ["//visibility:public"],
39 deps = [":constants_fbs"],
40)
41
42cc_binary(
43 name = "constants_sender",
44 srcs = ["constants_sender.cc"],
45 visibility = ["//visibility:public"],
46 deps = [
47 ":constants_fbs",
48 ":constants_list_fbs",
49 "//aos:init",
50 "//aos/events:shm_event_loop",
51 "//aos/testing:path",
52 "//frc971/constants:constants_sender_lib",
53 ],
54)