Enabled wiimote-debug output in release builds, changed debug

output to show the now used and derived value.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14555 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2013-11-23 22:55:35 +00:00
parent 86385f6107
commit af605462b2

View File

@ -79,16 +79,6 @@ void Wiimote::update()
float normalized_angle = -(m_wiimote_handle->accel.y-128)
/ UserConfigParams::m_wiimote_raw_max;
#ifdef DEBUG
if(UserConfigParams::m_wiimote_debug)
{
Log::verbose("wiimote", "xyz %d %d %d %f",
m_wiimote_handle->accel.x,
m_wiimote_handle->accel.y,
m_wiimote_handle->accel.z,
normalized_angle);
}
#endif
if(normalized_angle<-1.0f)
normalized_angle = -1.0f;
else if(normalized_angle>1.0f)
@ -107,6 +97,15 @@ void Wiimote::update()
+ w2 * sign*normalized_angle*normalized_angle
+ wa * asin(normalized_angle)*(2.0f/M_PI)
+ ws * sin(normalized_angle*(M_PI/2.0f));
if(UserConfigParams::m_wiimote_debug)
{
Log::verbose("wiimote", "raw %d normal %f result %f",
m_wiimote_handle->accel.y,
normalized_angle,
normalized_angle_2);
}
const float JOYSTICK_ABS_MAX_ANGLE = 32766.0f;
const float angle = normalized_angle_2 * JOYSTICK_ABS_MAX_ANGLE;