update documentation

This commit is contained in:
Konstantin Lampalzer 2022-10-13 00:02:11 +02:00
parent 6245d1308a
commit e1a17808f7
24 changed files with 1749 additions and 1014 deletions

View file

@ -1,3 +1,5 @@
import time
import compLib.CompLib_pb2 as CompLib_pb2
from compLib.CompLibClient import CompLibClient
@ -17,7 +19,8 @@ class IRSensor(object):
request.header.message_type = request.DESCRIPTOR.full_name
response = CompLib_pb2.IRSensorsReadAllResponse()
response.ParseFromString(CompLibClient.send(request.SerializeToString(), request.ByteSize()))
response.ParseFromString(CompLibClient.send(
request.SerializeToString(), request.ByteSize()))
return [i for i in response.data]
@ -29,6 +32,7 @@ class IRSensor(object):
request.header.message_type = request.DESCRIPTOR.full_name
CompLibClient.send(request.SerializeToString(), request.ByteSize())
time.sleep(0.1) # IR sensor reading is async -> Wait a bit
@staticmethod
def disable():
@ -38,3 +42,4 @@ class IRSensor(object):
request.header.message_type = request.DESCRIPTOR.full_name
CompLibClient.send(request.SerializeToString(), request.ByteSize())
time.sleep(0.1) # IR sensor reading is async -> Wait a bit