simphax / Touchmote

Touchmote
GNU General Public License v3.0
116 stars 31 forks source link

Fixed accelerometer bounds for threshold checking. #67

Closed Ryochan7 closed 8 years ago

Ryochan7 commented 8 years ago

When checking if accelerometer values have exceeded the assigned threshold, the calculated values were being multiplied by 2 when it was not necessary. Unlike values from the nunchuk analog stick, the values for the accelerometers in the nunchuk and Wiimote will typically be in the range of -1 to +1 so multiplying the values by 2 is not necessary and causes accelerometer virtual buttons to get activated way too easily.

This change corrects that problem so the threshold value assigned for accelerometer virtual buttons is more properly enforced.