Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Skateboarder/Stakeboarder.cpp
- Revision:
- 27:c920c5ec31af
- Parent:
- 26:4253656c0755
- Child:
- 28:be77ad6c0bda
--- a/Skateboarder/Stakeboarder.cpp Fri May 03 09:33:34 2019 +0000 +++ b/Skateboarder/Stakeboarder.cpp Sat May 04 13:26:50 2019 +0000 @@ -171,8 +171,9 @@ Gamepad &gamepad) { _jump_counter = jump_counter; _level_condition = level_condition; - // Jump condition. Jump from A button must be true. - if (jump) { + // Jump condition. Jump from A button must be true and counter less than 35 to + // limit double jump. + if (jump && _jump_counter < 35) { _jump_counter = 40; // Controls height and fall time. gamepad.tone(440, 0.05); // Buzzer jump sound. wait(0.05);