Add bot driving slower

This commit is contained in:
root 2021-11-12 19:17:14 +00:00
parent b2d025002e
commit c5dd14fb1f
3 changed files with 53 additions and 0 deletions

View file

@ -13,6 +13,7 @@ API_URL_GET_MATERIAL = API_URL + "getMaterial"
API_URL_GET_GARBAGE = API_URL + "getGarbage"
API_URL_GET_LIST_CARGO = API_URL + "listCargo"
API_URL_GET_CARGO = API_URL + "getCargo/"
API_URL_GET_ROBOT_STATE = API_URL + "getRobotState"
API_URL_GET_POS = API_URL + "getPos"
API_URL_GET_OP = API_URL + "getOp"
@ -87,6 +88,12 @@ class Seeding:
Logging.get_logger().debug(f"Seeding.get_cargo {result}, status code = {res.status_code}")
return result, res.status_code
@staticmethod
def get_robot_state() -> Tuple[Dict, int]:
res = requests.get(API_URL_GET_ROBOT_STATE)
result = json.loads(res.content)
Logging.get_logger().debug(f"Seeding.get_robot_state {result}, status code = {res.status_code}")
return result, res.status_code
class Position:
"""Datastructure for holding a position
@ -209,3 +216,4 @@ class DoubleElim:
response = json.loads(res.content)
Logging.get_logger().debug(f"DoubleElim.get_meteoroids = {response}, status code = {res.status_code}")
return response, res.status_code