Update tracking for in route to hub

This commit is contained in:
derek.holloway
2026-01-15 10:16:38 -08:00
parent 929a836645
commit 02812eb804
6 changed files with 16 additions and 4 deletions
+12 -1
View File
@@ -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)