Advertisement
silver2row

one, individual motor versus all at once...

Jan 31st, 2021
1,301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.05 KB | None | 0 0
  1. def add_motors_route(state, v1, v2, v3, v4):
  2.     @app.route("/" + state, endpoint=state)
  3.     def handler():
  4.         set_motors(v1, v2, v3, v4)
  5.         return homepage(title=state)
  6.  
  7. add_motors_route('0',          0,  1,  2,  3)
  8. add_motors_route('20',        20, 21, 22, 23)
  9. add_motors_route('30',        30, 31, 32, 33)
  10. add_motors_route('40',        40, 41, 42, 43)
  11. add_motors_route('50',        50, 51, 52, 53)
  12. add_motors_route('60',        60, 61, 62, 63)
  13. add_motors_route('70',        70, 71, 72, 73)
  14. add_motors_route('80',        80, 81, 82, 83)
  15. add_motors_route('90',        90, 91, 92, 93)
  16.  
  17. add_motors_route('-1',        -4,   -5,  -6,   -7)
  18. add_motors_route('-25',       -25,  -26, -27, -28)
  19. add_motors_route('-35',       -35,  -36, -37, -38)
  20. add_motors_route('-45',       -45,  -46, -47, -48)
  21. add_motors_route('-55',       -55,  -56, -57, -58)
  22. add_motors_route('-65',       -65,  -66, -67, -68)
  23. add_motors_route('-75',       -75,  -76, -77, -78)
  24. add_motors_route('-85',       -85,  -86, -87, -88)
  25. add_motors_route('-95',       -100, -97, -98, -99)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement