From d14bae53f60df18d52f7e199d0d2e2a323e55b8c Mon Sep 17 00:00:00 2001 From: Piv <18462828+Piv200@users.noreply.github.com> Date: Wed, 14 Aug 2019 22:03:22 +0930 Subject: [PATCH] Minor changes to motor service --- MotorControl/gpiozero/motor_session.py | 2 ++ MotorControl/protos/motorService.proto | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MotorControl/gpiozero/motor_session.py b/MotorControl/gpiozero/motor_session.py index aa30e96..561df2a 100644 --- a/MotorControl/gpiozero/motor_session.py +++ b/MotorControl/gpiozero/motor_session.py @@ -38,3 +38,5 @@ class Motor: print("Value must be an int.") return False + def stop(self): + self.set_throttle(0) \ No newline at end of file diff --git a/MotorControl/protos/motorService.proto b/MotorControl/protos/motorService.proto index 1b5ce9e..4bbde36 100644 --- a/MotorControl/protos/motorService.proto +++ b/MotorControl/protos/motorService.proto @@ -29,5 +29,5 @@ message HeartbeatCheckResponse{ service CarControl{ rpc SetThrottle(ThrottleRequest) returns (ThrottleResponse){} rpc SetSteering(SteeringRequest) returns (SteeringResponse){} - rpc Heartbeat(stream HeartbeatCheck) returns (HeartbeatCheckResponse){} + rpc Heartbeat(HeartbeatCheck) returns (HeartbeatCheckResponse){} } \ No newline at end of file