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/control_loops/superstructure/superstructure_replay.cc b/y2022/control_loops/superstructure/superstructure_replay.cc
index d7f03e6..70640de 100644
--- a/y2022/control_loops/superstructure/superstructure_replay.cc
+++ b/y2022/control_loops/superstructure/superstructure_replay.cc
@@ -3,7 +3,7 @@
// replayed, so that it can then be run through the plotting tool or analyzed
// in some other way. The original superstructure status data will be on the
// /original/superstructure channel.
-#include "gflags/gflags.h"
+#include "absl/flags/flag.h"
#include "aos/events/logging/log_reader.h"
#include "aos/events/logging/log_writer.h"
@@ -15,14 +15,14 @@
#include "y2022/constants.h"
#include "y2022/control_loops/superstructure/superstructure.h"
-DEFINE_int32(team, 971, "Team number to use for logfile replay.");
-DEFINE_string(output_folder, "/tmp/superstructure_replay/",
- "Logs all channels to the provided logfile.");
+ABSL_FLAG(int32_t, team, 971, "Team number to use for logfile replay.");
+ABSL_FLAG(std::string, output_folder, "/tmp/superstructure_replay/",
+ "Logs all channels to the provided logfile.");
int main(int argc, char **argv) {
aos::InitGoogle(&argc, &argv);
- aos::network::OverrideTeamNumber(FLAGS_team);
+ aos::network::OverrideTeamNumber(absl::GetFlag(FLAGS_team));
// open logfiles
aos::logger::LogReader reader(
@@ -40,11 +40,11 @@
aos::NodeEventLoopFactory *roborio =
factory.GetNodeEventLoopFactory("roborio");
- unlink(FLAGS_output_folder.c_str());
+ unlink(absl::GetFlag(FLAGS_output_folder).c_str());
std::unique_ptr<aos::EventLoop> logger_event_loop =
roborio->MakeEventLoop("logger");
auto logger = std::make_unique<aos::logger::Logger>(logger_event_loop.get());
- logger->StartLoggingOnRun(FLAGS_output_folder);
+ logger->StartLoggingOnRun(absl::GetFlag(FLAGS_output_folder));
roborio->OnStartup([roborio]() {
roborio->AlwaysStart<y2022::control_loops::superstructure::Superstructure>(