From 2a7ff7a9117536d53302ee93de3517ade99a33a5 Mon Sep 17 00:00:00 2001 From: lufimio Date: Wed, 13 Nov 2024 09:17:01 -0500 Subject: [PATCH] fix: :bug: actually make it compile also run clang-format --- include/gamepad/gamepad.hpp | 4 ++-- src/gamepad/gamepad.cpp | 2 +- src/main.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/gamepad/gamepad.hpp b/include/gamepad/gamepad.hpp index 886cbff..f382528 100644 --- a/include/gamepad/gamepad.hpp +++ b/include/gamepad/gamepad.hpp @@ -36,7 +36,7 @@ class Gamepad { * * @param screen the `AbstractScreen` to add to the screen queue * - * @b Example: + * @b Example: * @code {.cpp} * // initialize the alerts screen so we can have alerts on the controller * std::shared_ptr alerts = std::make_shared(); @@ -46,7 +46,7 @@ class Gamepad { void add_screen(std::shared_ptr screen); /** * @brief print a line to the console like pros (low priority) - * + * * @param line the line number to print the string on (0-2) * @param str the string to print onto the controller (\n to go to the next line) * diff --git a/src/gamepad/gamepad.cpp b/src/gamepad/gamepad.cpp index ceda387..7466035 100644 --- a/src/gamepad/gamepad.cpp +++ b/src/gamepad/gamepad.cpp @@ -47,7 +47,7 @@ void Gamepad::updateScreens() { std::set buttonUpdates; for (int i = pros::E_CONTROLLER_DIGITAL_L1; i <= pros::E_CONTROLLER_DIGITAL_A; ++i) { if ((this->*this->button_to_ptr(static_cast(i))).rising_edge) { - buttonUpdates.emplace(static_cast(i)); + buttonUpdates.emplace(static_cast(i)); } } diff --git a/src/main.cpp b/src/main.cpp index 2f2ffe2..2a7081d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,11 +17,11 @@ std::shared_ptr alerts = std::make_sharedadd_alerts(0, "a very\nimportant alert\nat " + std::to_string(pros::millis()) + " ms", 3000, "-.-"); @@ -31,7 +31,7 @@ void initialize() { // the second line when the B button is pressed gamepad::master.B.onPress( "print02", []() { gamepad::master.print_line(0, "the time is\n\n" + std::to_string(pros::millis()) + " ms"); }); - + // rumbles 3 times for a short duration when the X button is pressed gamepad::master.X.onPress("rumble", []() { gamepad::master.rumble("..."); });