Flush file at end of shooter tuning action.
Change-Id: I374024df731253fed690eccfba48669318efcdf8
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2020/actors/shooter_tuning_actor.cc b/y2020/actors/shooter_tuning_actor.cc
index a783c65..70bf00a 100644
--- a/y2020/actors/shooter_tuning_actor.cc
+++ b/y2020/actors/shooter_tuning_actor.cc
@@ -84,12 +84,11 @@
// Randomize the ordering of the velocities
std::srand(std::time(nullptr));
std::random_shuffle(velocities_.begin(), velocities_.end());
-
- fout_.open("shooter_tuning_data.csv", std::ios_base::app);
}
bool ShooterTuningActor::RunAction(
const frc971::autonomous::AutonomousActionParams * /*params*/) {
+ fout_.open("shooter_tuning_data.csv", std::ios_base::app);
LOG(INFO) << "velocity_accelerator,velocity_finisher,velocity_ball";
shooting_ = true;
@@ -106,6 +105,8 @@
velocity_finisher_ = 0.0;
velocity_accelerator_ = 0.0;
SendSuperstructureGoal();
+ fout_.close();
+ LOG(INFO) << "Done!";
return true;
}