Update tracking for in route to hub
This commit is contained in:
@@ -14,7 +14,10 @@ def main():
|
||||
|
||||
package_hash = DerekHashTable() # Init the hash table
|
||||
for pkg in AssignmentData.packages: # Load the packages into the hash table
|
||||
pkg.status = deliveryStatus.AT_THE_HUB
|
||||
if "Delayed" in pkg.notes:
|
||||
pkg.status = deliveryStatus.IN_ROUTE_TO_HUB
|
||||
else:
|
||||
pkg.status = deliveryStatus.AT_THE_HUB
|
||||
package_hash.addItem(pkg.id, pkg)
|
||||
|
||||
truck1 = Truck("1") # Init truck 1 starting at 8:00
|
||||
@@ -66,8 +69,16 @@ def main():
|
||||
debounce2 = True
|
||||
debounce3 = True
|
||||
truck3LoadDebounce = True
|
||||
arrivalDebounce = True
|
||||
while True:
|
||||
|
||||
# check if packages have arrived to the hub
|
||||
if arrivalDebounce and globalTime >= datetime.time(9, 5):
|
||||
arrivalDebounce = False
|
||||
for v in package_hash:
|
||||
if v.status == deliveryStatus.IN_ROUTE_TO_HUB:
|
||||
v.status = deliveryStatus.AT_THE_HUB
|
||||
|
||||
# check for pause time
|
||||
if globalTime >= pauseTime:
|
||||
pauseTime = UserUI.TimePrompt(globalTime, truck1, truck2, truck3, package_hash)
|
||||
|
||||
Reference in New Issue
Block a user