y2019 robot code starts!
We are now deploying the config, and all the missing locations are now
available. Some channels got renamed to be more user friendly.
Change-Id: Idc771998b24a769994ec80f3aee292b0d1ac6240
diff --git a/frc971/wpilib/BUILD b/frc971/wpilib/BUILD
index 8d0982a..c2cdb51 100644
--- a/frc971/wpilib/BUILD
+++ b/frc971/wpilib/BUILD
@@ -8,6 +8,7 @@
srcs = [
"logging.fbs",
],
+ gen_reflections = 1,
)
cc_library(
@@ -127,6 +128,15 @@
)
aos_config(
+ name = "config",
+ src = "wpilib_config.json",
+ flatbuffers = [
+ ":pdp_values_fbs",
+ ":logging_fbs",
+ ],
+)
+
+aos_config(
name = "loop_output_handler_test_config",
src = "loop_output_handler_test_config_source.json",
flatbuffers = [
@@ -208,10 +218,11 @@
)
flatbuffer_cc_library(
- name = "pdp_values",
+ name = "pdp_values_fbs",
srcs = [
"pdp_values.fbs",
],
+ gen_reflections = 1,
)
cc_library(
@@ -224,7 +235,7 @@
],
restricted_to = ["//tools:roborio"],
deps = [
- ":pdp_values",
+ ":pdp_values_fbs",
"//aos:init",
"//aos/events:event_loop",
"//aos/util:phased_loop",
diff --git a/frc971/wpilib/logging.fbs b/frc971/wpilib/logging.fbs
index 473526f..fcb4235 100644
--- a/frc971/wpilib/logging.fbs
+++ b/frc971/wpilib/logging.fbs
@@ -5,3 +5,5 @@
compressor_on:bool;
read_solenoids:ubyte;
}
+
+root_type PneumaticsToLog;
diff --git a/frc971/wpilib/sensor_reader.cc b/frc971/wpilib/sensor_reader.cc
index 8610105..d4ea66e 100644
--- a/frc971/wpilib/sensor_reader.cc
+++ b/frc971/wpilib/sensor_reader.cc
@@ -18,7 +18,7 @@
SensorReader::SensorReader(::aos::EventLoop *event_loop)
: event_loop_(event_loop),
robot_state_sender_(
- event_loop_->MakeSender<::aos::RobotState>(".aos.robot_state")),
+ event_loop_->MakeSender<::aos::RobotState>("/aos")),
my_pid_(getpid()) {
// Set some defaults. We don't tend to exceed these, so old robots should
// just work with them.
diff --git a/frc971/wpilib/wpilib_config.json b/frc971/wpilib/wpilib_config.json
new file mode 100644
index 0000000..eb9a716
--- /dev/null
+++ b/frc971/wpilib/wpilib_config.json
@@ -0,0 +1,13 @@
+{
+ "channels":
+ [
+ {
+ "name": "/aos",
+ "type": "frc971.PDPValues"
+ },
+ {
+ "name": "/aos",
+ "type": "frc971.wpilib.PneumaticsToLog"
+ }
+ ]
+}