Implement SCALING with ENV variable

This commit is contained in:
2021-06-17 22:37:40 +02:00
parent e66f1fcab8
commit 294584d788
10 changed files with 19 additions and 16 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import pickle
import threading
import time
import os
from datetime import datetime
from circuitbreaker import circuit
@@ -13,7 +14,7 @@ from pika.exceptions import AMQPConnectionError
SWITCHING_TIME = 15
# Scale speed of switching by factor x
SCALING = 6
SCALING = int(os.environ['DSE2021_SCALING'])
class TrafficLight:
+2 -1
View File
@@ -1,6 +1,7 @@
import pickle
import threading
import time
import os
from datetime import datetime
from typing import Union
@@ -19,7 +20,7 @@ STARTING_POINT = geopy.Point(47.89053, 16.20703)
# Driving direction in degrees: 0=N, 90=E, 180=S, 270=W
BEARING = 2
# Scale speed of vehicles by factor x
SCALING = 6
SCALING = int(os.environ['DSE2021_SCALING'])
# in km/h
STARTING_VELOCITY = 130 * SCALING
# Interval between status updates in seconds (is not scaled)