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/y2014_bot3/control_loops/drivetrain/drivetrain_base.cc b/y2014_bot3/control_loops/drivetrain/drivetrain_base.cc
index 89cda1a..6a6ed31 100644
--- a/y2014_bot3/control_loops/drivetrain/drivetrain_base.cc
+++ b/y2014_bot3/control_loops/drivetrain/drivetrain_base.cc
@@ -35,15 +35,23 @@
chrono::duration_cast<chrono::nanoseconds>(
chrono::duration<double>(drivetrain::kDt)),
- drivetrain::kRobotRadius, drivetrain::kWheelRadius, drivetrain::kV,
+ drivetrain::kRobotRadius,
+ drivetrain::kWheelRadius,
+ drivetrain::kV,
- drivetrain::kHighGearRatio, drivetrain::kLowGearRatio, drivetrain::kJ,
+ drivetrain::kHighGearRatio,
+ drivetrain::kLowGearRatio,
+ drivetrain::kJ,
drivetrain::kMass,
// No shifter sensors, so we could put anything for the things below.
- kThreeStateDriveShifter, kThreeStateDriveShifter,
- false /* default_high_gear */, 0.0, 0.60 /* wheel_non_linearity */,
- 0.60 /* quickturn_wheel_multiplier */, 0.7 /* wheel_multiplier */,
+ kThreeStateDriveShifter,
+ kThreeStateDriveShifter,
+ false /* default_high_gear */,
+ 0.0,
+ 0.60 /* wheel_non_linearity */,
+ 0.60 /* quickturn_wheel_multiplier */,
+ 0.7 /* wheel_multiplier */,
};
return kDrivetrainConfig;
diff --git a/y2014_bot3/control_loops/rollers/rollers_main.cc b/y2014_bot3/control_loops/rollers/rollers_main.cc
index c17caa9..f993dc4 100644
--- a/y2014_bot3/control_loops/rollers/rollers_main.cc
+++ b/y2014_bot3/control_loops/rollers/rollers_main.cc
@@ -1,7 +1,6 @@
-#include "y2014_bot3/control_loops/rollers/rollers.h"
-
#include "aos/events/shm_event_loop.h"
#include "aos/init.h"
+#include "y2014_bot3/control_loops/rollers/rollers.h"
int main(int argc, char **argv) {
::aos::InitGoogle(&argc, &argv);
diff --git a/y2014_bot3/joystick_reader.cc b/y2014_bot3/joystick_reader.cc
index 9b25c37..0c48552 100644
--- a/y2014_bot3/joystick_reader.cc
+++ b/y2014_bot3/joystick_reader.cc
@@ -99,9 +99,8 @@
} else if (data.IsPressed(kHumanPlayer)) {
rollers_goal.human_player = true;
}
- if (builder.Send(control_loops::rollers::Goal::Pack(*builder.fbb(),
- &rollers_goal)) !=
- aos::RawSender::Error::kOk) {
+ if (builder.Send(control_loops::rollers::Goal::Pack(
+ *builder.fbb(), &rollers_goal)) != aos::RawSender::Error::kOk) {
AOS_LOG(WARNING, "Sending rollers values failed.\n");
}
}
diff --git a/y2014_bot3/shifter_hall_effect.h b/y2014_bot3/shifter_hall_effect.h
index abe81e3..a4bdeb8 100644
--- a/y2014_bot3/shifter_hall_effect.h
+++ b/y2014_bot3/shifter_hall_effect.h
@@ -13,8 +13,7 @@
double clear_high, clear_low;
};
-
-} // constants
-} // bot3
+} // namespace constants
+} // namespace bot3
#endif