Simplify aos::Init
Most of the variants were to deal with core, which has been gone for a
year. Simplify those all into InitGoogle.
InitGoogle should be renamed to Init at some point. It does everything
now.
Change-Id: I738ee03e9c5b2e6348ef33302835f915df68011f
diff --git a/y2019/actors/autonomous_actor_main.cc b/y2019/actors/autonomous_actor_main.cc
index 705db28..ec5234b 100644
--- a/y2019/actors/autonomous_actor_main.cc
+++ b/y2019/actors/autonomous_actor_main.cc
@@ -4,8 +4,8 @@
#include "aos/init.h"
#include "y2019/actors/autonomous_actor.h"
-int main(int /*argc*/, char * /*argv*/ []) {
- ::aos::Init(-1);
+int main(int argc, char *argv[]) {
+ ::aos::InitGoogle(&argc, &argv);
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig("config.json");
diff --git a/y2019/control_loops/drivetrain/drivetrain_main.cc b/y2019/control_loops/drivetrain/drivetrain_main.cc
index 53e2bf5..5641d1d 100644
--- a/y2019/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2019/control_loops/drivetrain/drivetrain_main.cc
@@ -7,8 +7,8 @@
using ::frc971::control_loops::drivetrain::DrivetrainLoop;
-int main() {
- ::aos::InitNRT();
+int main(int argc, char **argv) {
+ ::aos::InitGoogle(&argc, &argv);
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig("config.json");
diff --git a/y2019/control_loops/drivetrain/drivetrain_replay.cc b/y2019/control_loops/drivetrain/drivetrain_replay.cc
index 98f3eeb..69cce4f 100644
--- a/y2019/control_loops/drivetrain/drivetrain_replay.cc
+++ b/y2019/control_loops/drivetrain/drivetrain_replay.cc
@@ -23,8 +23,6 @@
aos::network::OverrideTeamNumber(FLAGS_team);
- aos::InitCreate();
-
const aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig(FLAGS_config);
diff --git a/y2019/control_loops/drivetrain/replay_localizer.cc b/y2019/control_loops/drivetrain/replay_localizer.cc
index de28317..3687e3d 100644
--- a/y2019/control_loops/drivetrain/replay_localizer.cc
+++ b/y2019/control_loops/drivetrain/replay_localizer.cc
@@ -398,8 +398,6 @@
::aos::network::OverrideTeamNumber(FLAGS_team);
- ::aos::InitCreate();
-
::y2019::control_loops::drivetrain::LocalizerReplayer replay;
replay.ProcessFile(FLAGS_logfile.c_str());
diff --git a/y2019/control_loops/superstructure/superstructure_main.cc b/y2019/control_loops/superstructure/superstructure_main.cc
index 7a7eff9..c55ac4b 100644
--- a/y2019/control_loops/superstructure/superstructure_main.cc
+++ b/y2019/control_loops/superstructure/superstructure_main.cc
@@ -3,8 +3,8 @@
#include "aos/events/shm_event_loop.h"
#include "aos/init.h"
-int main(int /*argc*/, char * /*argv*/ []) {
- ::aos::InitNRT();
+int main(int argc, char **argv) {
+ ::aos::InitGoogle(&argc, &argv);
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig("config.json");
diff --git a/y2019/joystick_reader.cc b/y2019/joystick_reader.cc
index 5dc75a7..823507d 100644
--- a/y2019/joystick_reader.cc
+++ b/y2019/joystick_reader.cc
@@ -662,8 +662,8 @@
} // namespace input
} // namespace y2019
-int main() {
- ::aos::InitNRT();
+int main(int argc, char **argv) {
+ ::aos::InitGoogle(&argc, &argv);
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig("config.json");
diff --git a/y2019/vision/server/server.cc b/y2019/vision/server/server.cc
index 56aa289..6d436e9 100644
--- a/y2019/vision/server/server.cc
+++ b/y2019/vision/server/server.cc
@@ -280,11 +280,11 @@
} // namespace vision
} // namespace y2019
-int main(int, char *[]) {
+int main(int argc, char **argv) {
// Make sure to reference this to force the linker to include it.
findEmbeddedContent("");
- aos::InitNRT();
+ ::aos::InitGoogle(&argc, &argv);
seasocks::Server server(::std::shared_ptr<seasocks::Logger>(
new ::aos::seasocks::SeasocksLogger(seasocks::Logger::Level::Info)));