Advertisement
Guest User

Untitled

a guest
May 24th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. void getData(){
  2.  
  3.  
  4. Bluetooth_parseSpeed(&speed);
  5. Bluetooth_parseServo(&servo);
  6. Bluetooth_parseDirection(&direction);
  7. Bluetooth_parseLights(&lights);
  8. Bluetooth_parseHorn(&horn);
  9. PORTA|=(1<<PA0);
  10. // last2(&speed,&servo,&direction,&lights,&horn);
  11.  
  12. if(speed<=0 || speed>255)
  13. speed = SPEED_DEFAULT;
  14.  
  15. if(servo<355 || servo>450)
  16. servo = SERVO_DEFAULT;
  17.  
  18. if(direction!=0 && direction!=1)
  19. direction = DIRECTION_DEFAULT;
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement