Move over to ABSL logging and flags.
Removes gperftools too since that wants gflags.
Here come the fireworks.
Change-Id: I79cb7bcf60f1047fbfa28bfffc21a0fd692e4b1c
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2022/setpoint_setter.cc b/y2022/setpoint_setter.cc
index fa1e536..b99d238 100644
--- a/y2022/setpoint_setter.cc
+++ b/y2022/setpoint_setter.cc
@@ -1,15 +1,15 @@
-#include "gflags/gflags.h"
-#include "glog/logging.h"
+#include "absl/flags/flag.h"
#include "aos/events/shm_event_loop.h"
#include "aos/init.h"
#include "y2022/setpoint_generated.h"
-DEFINE_double(catapult_position, 0.03, "Catapult shot position");
-DEFINE_double(catapult_velocity, 18.0, "Catapult shot velocity");
-DEFINE_double(turret, 0.0, "Turret setpoint");
+ABSL_FLAG(double, catapult_position, 0.03, "Catapult shot position");
+ABSL_FLAG(double, catapult_velocity, 18.0, "Catapult shot velocity");
+ABSL_FLAG(double, turret, 0.0, "Turret setpoint");
-DEFINE_string(config, "aos_config.json", "Path to the config file to use.");
+ABSL_FLAG(std::string, config, "aos_config.json",
+ "Path to the config file to use.");
using y2022::input::joysticks::Setpoint;
@@ -17,7 +17,7 @@
aos::InitGoogle(&argc, &argv);
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
- aos::configuration::ReadConfig(FLAGS_config);
+ aos::configuration::ReadConfig(absl::GetFlag(FLAGS_config));
aos::ShmEventLoop event_loop(&config.message());
@@ -27,9 +27,11 @@
Setpoint::Builder setpoint_builder = builder.MakeBuilder<Setpoint>();
- setpoint_builder.add_catapult_position(FLAGS_catapult_position);
- setpoint_builder.add_catapult_velocity(FLAGS_catapult_velocity);
- setpoint_builder.add_turret(FLAGS_turret);
+ setpoint_builder.add_catapult_position(
+ absl::GetFlag(FLAGS_catapult_position));
+ setpoint_builder.add_catapult_velocity(
+ absl::GetFlag(FLAGS_catapult_velocity));
+ setpoint_builder.add_turret(absl::GetFlag(FLAGS_turret));
builder.CheckOk(builder.Send(setpoint_builder.Finish()));
return 0;