Fix Motor Server and python controller
This commit is contained in:
@@ -3,10 +3,10 @@ print("Connecting to pi")
|
||||
import grpc
|
||||
from concurrent import futures
|
||||
import motorService_pb2_grpc
|
||||
from motorService_pb2 import ThrottleRequest
|
||||
from motorService_pb2 import SteeringRequest, ThrottleRequest
|
||||
import time
|
||||
|
||||
throttle = 0
|
||||
throttle = 0.1
|
||||
timer = None
|
||||
|
||||
class ThrottleIterator:
|
||||
@@ -27,8 +27,7 @@ class ThrottleIterator:
|
||||
channel = grpc.insecure_channel('10.0.0.53:50051')
|
||||
stub = motorService_pb2_grpc.CarControlStub(channel)
|
||||
|
||||
stub.SetThrottle(ThrottleIterator())
|
||||
response = stub.SetThrottle(ThrottleIterator())
|
||||
|
||||
while True:
|
||||
inp = int(input('Please enter a value for the throttle between -100 and 100'))
|
||||
throttle = inp / 100
|
||||
throttle = int(input('Please enter a value for the throttle between -100 and 100'))
|
||||
|
||||
Reference in New Issue
Block a user