Run clang-format on the entire repo
This patch clang-formats the entire repo. Third-party code is
excluded.
I needed to fix up the .clang-format file so that all the header
includes are ordered properly. I could have sworn that it used to work
without the extra modification, but I guess not.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I64bb9f2c795401393f9dfe2fefc4f04cb36b52f6
diff --git a/y2019/control_loops/drivetrain/localizer_test.cc b/y2019/control_loops/drivetrain/localizer_test.cc
index 1c9485a..28f0235 100644
--- a/y2019/control_loops/drivetrain/localizer_test.cc
+++ b/y2019/control_loops/drivetrain/localizer_test.cc
@@ -3,15 +3,17 @@
#include <queue>
#include <random>
+#include "gflags/gflags.h"
+
#include "aos/testing/random_seed.h"
#include "aos/testing/test_shm.h"
#include "frc971/control_loops/drivetrain/splinedrivetrain.h"
#include "frc971/control_loops/drivetrain/trajectory.h"
-#include "gflags/gflags.h"
#if defined(SUPPORT_PLOT)
#include "third_party/matplotlib-cpp/matplotlibcpp.h"
#endif
#include "gtest/gtest.h"
+
#include "y2019/constants.h"
#include "y2019/control_loops/drivetrain/drivetrain_base.h"
@@ -490,9 +492,9 @@
const double left_enc = state(StateIdx::kLeftEncoder, 0);
const double right_enc = state(StateIdx::kRightEncoder, 0);
- const double gyro = (state(StateIdx::kRightVelocity) -
- state(StateIdx::kLeftVelocity)) /
- dt_config_.robot_radius / 2.0;
+ const double gyro =
+ (state(StateIdx::kRightVelocity) - state(StateIdx::kLeftVelocity)) /
+ dt_config_.robot_radius / 2.0;
const TestLocalizer::State xdot = DiffEq(state, U);
const Eigen::Vector3d accel(
localizer_.CalcLongitudinalVelocity(xdot) -