added timestamp to target_velocity.py

This commit is contained in:
Marco Zeisler
2021-06-02 22:45:23 +02:00
parent 89db75f868
commit 6f27401882
2 changed files with 9 additions and 2 deletions
+3 -1
View File
@@ -1,3 +1,4 @@
import datetime
import pickle
import sys
from random import randrange
@@ -69,7 +70,8 @@ class Orchestrator:
target_vel = randrange(0, 130)
print('Target velocity: {}'.format(target_vel))
response_channel.send(pickle.dumps(
TargetVelocity(vin=received_daf_object.vehicle_identification_number, target_velocity=target_vel)))
TargetVelocity(vin=received_daf_object.vehicle_identification_number, target_velocity=target_vel,
timestamp=datetime.datetime.now())))
def handle_tl_state_receive(self, msg):
"""