Created
April 10, 2019 19:06
-
-
Save acetousk/e208d36445428aee0502cd1fbe2cd90c to your computer and use it in GitHub Desktop.
controller deadzone verify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int leftJoyVerify(){ | |
static int count; | |
if(((Controller1.Axis4.value()*Controller1.Axis4.value())/37.5)+37.5<=Controller1.Axis3.value()) | |
count++; | |
if((-(Controller1.Axis4.value()*Controller1.Axis4.value())/37.5)-37.5<=Controller1.Axis3.value()) | |
count++; | |
if(((Controller1.Axis3.value()*Controller1.Axis3.value())/37.5)+37.5<=Controller1.Axis4.value()) | |
count++; | |
if((-(Controller1.Axis3.value()*Controller1.Axis3.value())/37.5)-37.5<=Controller1.Axis4.value()) | |
count++; | |
if(count==1){ | |
return 1; | |
}else{ | |
return 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment