added start, rx_start etc

This commit is contained in:
Erik Frojdh 2020-08-19 17:06:54 +02:00
parent 9bae97ec4c
commit 7212a0d433
2 changed files with 19 additions and 3 deletions

View File

@ -86,8 +86,8 @@ But lets start looking at the at the manual way:
#Start the measurement
t0 = time.time()
d.start_receiver()
d.start_detector()
d.startDetector()
d.startReceiver()
#Wait for the detector to be ready or do other important stuff
time.sleep(t*n)
@ -98,7 +98,7 @@ But lets start looking at the at the manual way:
#Stop the receiver after we got the frames
#Detector is already idle so we don't need to stop it
d.stop_receiver()
d.stopReceiver()
lost = d.frames_caught - n
print(f'{n} frames of {t}s took {time.time()-t0:{.3}}s with {lost} frames lost ')

View File

@ -240,6 +240,22 @@ class Detector(CppDetectorApi):
def delayl(self):
return ut.reduce_time(self.getDelayAfterTriggerLeft())
def start(self):
"""Start detector"""
self.startDetector()
def rx_start(self):
"""Start receiver"""
self.startReceiver()
def rx_stop(self):
"""Stop receiver"""
self.stopReceiver()
def stop(self):
"""Stop detector"""
self.stopDetector()
# Time
@property
def rx_framescaught(self):