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
@@ -1,10 +1,15 @@
from dataclasses import dataclass
from datetime import datetime
@dataclass
class TargetVelocity:
vin: str
target_velocity: float
timestamp: datetime
def to_dict(self):
return self.__dict__
return {'vin': self.vin,
'target_velocity': self.target_velocity,
'timestamp': self.timestamp.timestamp()
}