Skip to content

Commit

Permalink
fix Y axis direction
Browse files Browse the repository at this point in the history
  • Loading branch information
YanMinge committed Oct 8, 2016
1 parent fae7bb4 commit 09c7d39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions makeblock/src/MePS2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ int16_t MePS2::MeAnalog(uint8_t button)
if(button == MePS2_RX || button == MePS2_RY || button == MePS2_LX || button == MePS2_LY)
{
result = 2*(ps2_data_list[button]-128);
if((button == MePS2_RY) || (button == MePS2_LY))
{
result = -result;
}
if(result == -256)
{
result = -255;
Expand Down

0 comments on commit 09c7d39

Please sign in to comment.