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/y2020/actors/autonomous_actor_main.cc b/y2020/actors/autonomous_actor_main.cc
index b242e05..dcd0133 100644
--- a/y2020/actors/autonomous_actor_main.cc
+++ b/y2020/actors/autonomous_actor_main.cc
@@ -4,8 +4,8 @@
#include "aos/init.h"
#include "y2020/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/y2020/control_loops/drivetrain/drivetrain_main.cc b/y2020/control_loops/drivetrain/drivetrain_main.cc
index 38a1b0d..e73c023 100644
--- a/y2020/control_loops/drivetrain/drivetrain_main.cc
+++ b/y2020/control_loops/drivetrain/drivetrain_main.cc
@@ -8,7 +8,6 @@
int main(int argc, char *argv[]) {
::aos::InitGoogle(&argc, &argv);
- ::aos::InitNRT();
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig("config.json");
diff --git a/y2020/control_loops/drivetrain/drivetrain_replay.cc b/y2020/control_loops/drivetrain/drivetrain_replay.cc
index 0ed57c5..dfd8623 100644
--- a/y2020/control_loops/drivetrain/drivetrain_replay.cc
+++ b/y2020/control_loops/drivetrain/drivetrain_replay.cc
@@ -27,8 +27,6 @@
aos::network::OverrideTeamNumber(FLAGS_team);
- aos::InitCreate();
-
const aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig(FLAGS_config);
diff --git a/y2020/control_loops/superstructure/superstructure_main.cc b/y2020/control_loops/superstructure/superstructure_main.cc
index c0ac956..a9f071d 100644
--- a/y2020/control_loops/superstructure/superstructure_main.cc
+++ b/y2020/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/y2020/joystick_reader.cc b/y2020/joystick_reader.cc
index 1cd3295..4528298 100644
--- a/y2020/joystick_reader.cc
+++ b/y2020/joystick_reader.cc
@@ -188,8 +188,8 @@
} // namespace input
} // namespace y2020
-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/y2020/setpoint_setter.cc b/y2020/setpoint_setter.cc
index f4aa03a..3f493c9 100644
--- a/y2020/setpoint_setter.cc
+++ b/y2020/setpoint_setter.cc
@@ -7,9 +7,8 @@
DEFINE_double(finisher, 500.0, "Finsher speed");
DEFINE_double(hood, 0.45, "Hood setpoint");
-int main(int argc, char ** argv) {
+int main(int argc, char **argv) {
aos::InitGoogle(&argc, &argv);
- aos::InitNRT();
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
aos::configuration::ReadConfig("config.json");