From 30916899d95d2b7e2eeb0276b4253bbc33973bc8 Mon Sep 17 00:00:00 2001 From: Robin Strand Prestmo Date: Fri, 24 Oct 2025 16:50:31 +0200 Subject: [PATCH] La til noen drive funksjoner --- py/src/drive.py | 4 ++++ py/src/robot.py | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/py/src/drive.py b/py/src/drive.py index e6870a6..ca40f5e 100644 --- a/py/src/drive.py +++ b/py/src/drive.py @@ -21,4 +21,8 @@ def forward(self, speed): def backward(self, speed): self.driveBase.drive(speed, 0 ) + + def turn(self, speed, angle): + self.driveBase.drive(speed, angle) + \ No newline at end of file diff --git a/py/src/robot.py b/py/src/robot.py index dd2c32f..a353bef 100644 --- a/py/src/robot.py +++ b/py/src/robot.py @@ -17,5 +17,11 @@ def __init__(self, drive: Drive, sensors: Sensors): self.drive = drive self.sensors = sensors - + def start(self): + self.drive.forward(50) + pass + + def stop(self): + self.drive.forward(0) + pass