Skip to content

Commit

Permalink
Merge branch 'main' into feature/global-instances
Browse files Browse the repository at this point in the history
  • Loading branch information
ion098 authored Aug 13, 2024
2 parents 8f26067 + 18d8680 commit 9a6beb9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.17
- uses: DoozyX/clang-format-lint-action@v0.18
with:
source: './src/gamepad ./include/gamepad'
extensions: 'hpp,cpp'
clangFormatVersion: 17
clangFormatVersion: 18
2 changes: 1 addition & 1 deletion .github/workflows/pros-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: LemLib/pros-build@e0f3251974c2f5b044b8e5d8665db7cfcb5dfad7
- uses: LemLib/pros-build@v2.0.2
with:
library-path: gamepad
20 changes: 10 additions & 10 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* "I was pressed!" and nothing.
*/
void on_center_button() {
static bool pressed = false;
pressed = !pressed;
if (pressed) {
pros::lcd::set_text(2, "I was pressed!");
} else {
pros::lcd::clear_line(2);
}
static bool pressed = false;
pressed = !pressed;
if (pressed) {
pros::lcd::set_text(2, "I was pressed!");
} else {
pros::lcd::clear_line(2);
}
}

/**
Expand All @@ -24,10 +24,10 @@ void on_center_button() {
* to keep execution time for this mode under a few seconds.
*/
void initialize() {
pros::lcd::initialize();
pros::lcd::set_text(1, "Hello PROS User!");
pros::lcd::initialize();
pros::lcd::set_text(1, "Hello PROS User!");

pros::lcd::register_btn1_cb(on_center_button);
pros::lcd::register_btn1_cb(on_center_button);
}

/**
Expand Down

0 comments on commit 9a6beb9

Please sign in to comment.