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/frc971/orin/hardware_monitor.cc b/frc971/orin/hardware_monitor.cc
index e1c785b..cc019fd 100644
--- a/frc971/orin/hardware_monitor.cc
+++ b/frc971/orin/hardware_monitor.cc
@@ -1,16 +1,17 @@
#include <dirent.h>
#include <sys/statvfs.h>
+#include "absl/flags/flag.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_format.h"
-#include "gflags/gflags.h"
#include "aos/events/shm_event_loop.h"
#include "aos/init.h"
#include "frc971/orin/hardware_stats_generated.h"
-DEFINE_string(config, "aos_config.json", "File path of aos configuration");
-DEFINE_bool(log_voltages, false, "If true, log voltages too.");
+ABSL_FLAG(std::string, config, "aos_config.json",
+ "File path of aos configuration");
+ABSL_FLAG(bool, log_voltages, false, "If true, log voltages too.");
namespace frc971::orin {
namespace {
@@ -102,7 +103,7 @@
flatbuffers::Offset<
flatbuffers::Vector<flatbuffers::Offset<ElectricalReading>>>
electrical_readings_offset;
- if (FLAGS_log_voltages) {
+ if (absl::GetFlag(FLAGS_log_voltages)) {
std::vector<flatbuffers::Offset<ElectricalReading>> electrical_readings;
// Iterate through INA3221 electrical reading channels
for (int channel = 1; channel <= 3; channel++) {
@@ -182,7 +183,7 @@
aos::InitGoogle(&argc, &argv);
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
- aos::configuration::ReadConfig(FLAGS_config);
+ aos::configuration::ReadConfig(absl::GetFlag(FLAGS_config));
aos::ShmEventLoop shm_event_loop(&config.message());