bool RA_JoystickClass::IsUp() { JoystickCenter(); #if defined DIGITAL_JOYSTICK if ( (analogRead(VPin)>750 && (millis()-KeyKeep)>KeyPressRate/KeyTurbo) ) #elif defined REEFANGEL_MINI if ( (analogRead(VPin)>750 && analogRead(HPin)<250 && (millis()-KeyKeep)>KeyPressRate/KeyTurbo) ) #else if ( (analogRead(VPin)>CalV+70 && (millis()-KeyKeep)>KeyPressRate/KeyTurbo) ) #endif //defined DIGITAL_JOYSTICK || defined REEFANGEL_MINI { CheckTurbo(); return true; } else { return false; } }
bool RA_JoystickClass::IsDown() { JoystickCenter(); #ifdef REEFANGEL_ONE if ( (analogRead(HPin)<750 && analogRead(HPin)>250 && (millis()-KeyKeep)>KeyPressRate/KeyTurbo) ) #elif defined REEFANGEL_MINI if ( (analogRead(HPin)>750 && analogRead(VPin)<250 && (millis()-KeyKeep)>KeyPressRate/KeyTurbo) ) #else if ( (analogRead(VPin)<CalV-70 && (millis()-KeyKeep)>KeyPressRate/KeyTurbo) ) #endif //REEFANGEL_ONE { CheckTurbo(); return true; } else { return false; } }
bool RA_JoystickClass::IsRight() { JoystickCenter(); #ifdef DIGITAL_JOYSTICK if ( (analogRead(HPin)>750 && (millis()-KeyKeep)>KeyPressRate/KeyTurbo) ) #elif defined REEFANGEL_MINI if (false) #else if ( (analogRead(HPin)<CalH-70 && (millis()-KeyKeep)>KeyPressRate/KeyTurbo) ) #endif //DIGITAL_JOYSTICK { CheckTurbo(); return true; } else { return false; } }