Update tracking for in route to hub
This commit is contained in:
+4
-3
@@ -26,6 +26,7 @@ class DeliveryObject:
|
||||
|
||||
class deliveryStatus(Enum):
|
||||
NO_STATUS = 0
|
||||
AT_THE_HUB = 1
|
||||
IN_ROUTE = 2
|
||||
DELIVERED = 3
|
||||
IN_ROUTE_TO_HUB = 1
|
||||
AT_THE_HUB = 2
|
||||
IN_ROUTE = 3
|
||||
DELIVERED = 4
|
||||
Vendored
BIN
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
Binary file not shown.
@@ -14,6 +14,9 @@ def main():
|
||||
|
||||
package_hash = DerekHashTable() # Init the hash table
|
||||
for pkg in AssignmentData.packages: # Load the packages into the hash table
|
||||
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)
|
||||
|
||||
@@ -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