From 42212f5a7ebeb1317975ff3fb95655eab18ca9f2 Mon Sep 17 00:00:00 2001 From: Sol Huebner Date: Thu, 14 Nov 2019 11:37:08 -0500 Subject: [PATCH] Attack should fie if threshold is reached Either we need to modify the getInput example (as it will not trigger the attack by default): if(digitalRead(attackButtonPinNumber) == HIGH) joystickWobble = ATTACK_THRESHOLD; Or we can just say, that the user attacks when the threshold is reached (makes it easier to understand if you use alternative input methods). --- TWANG32/TWANG32.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TWANG32/TWANG32.ino b/TWANG32/TWANG32.ino index a8e0793..7ca52a8 100644 --- a/TWANG32/TWANG32.ino +++ b/TWANG32/TWANG32.ino @@ -290,7 +290,7 @@ void loop() { if(attacking && attackMillis+ATTACK_DURATION < mm) attacking = 0; // If not attacking, check if they should be - if(!attacking && joystickWobble > user_settings.attack_threshold){ + if(!attacking && joystickWobble >= user_settings.attack_threshold){ attackMillis = mm; attacking = 1; }