Guest User

Untitled

a guest
Jun 13th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1.  if(command.ReadMsgs() > 0){
  2.     digitalWrite(0,HIGH-digitalRead(0));
  3.     if((command.walkV) > 5 || (command.walkV < -5) ){
  4.     Xspeed = multiplier*(command.walkV);
  5. //    bodyPosX = (-(float)command.walkV)/2;
  6.     }else{
  7.       Xspeed = 0;
  8.     }
  9.     if((command.buttons&BUT_LT) > 0){
  10.       if((command.walkH) > 5 || (command.walkH < -5) ){
  11.       Yspeed = (2*(command.walkH));
  12.       }
  13.       else
  14.       {
  15.         Yspeed = 0;
  16.       }
  17.   }
  18.   else
  19.   {
  20.       Rspeed = -(command.walkH)/150.0;
  21.       Yspeed = 0;
  22.   }
  23.   }
Add Comment
Please, Sign In to add comment