-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e59158
commit ebcb0a8
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from car_park import CarPark | ||
from sensor import EntrySensor, ExitSensor | ||
from display import Display | ||
|
||
|
||
def main(): | ||
car_park = CarPark(location="moondalup", capacity=100, log_file="moondalup.txt") | ||
entry_sensor = EntrySensor(id=1, is_active=True, car_park=car_park) | ||
exit_sensor = ExitSensor(id=2, is_active=True, car_park=car_park) | ||
display = Display(id=1, message="Welcome to Moondalup", is_on=True, car_park=car_park) | ||
|
||
for _ in range(10): | ||
entry_sensor.detect_vehicle() | ||
|
||
for _ in range(2): | ||
exit_sensor.detect_vehicle() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FAKE-991 entered at 2023-12-02 20:53:41 | ||
FAKE-267 entered at 2023-12-02 20:53:41 | ||
FAKE-984 entered at 2023-12-02 20:53:41 | ||
FAKE-327 entered at 2023-12-02 20:53:41 | ||
FAKE-744 entered at 2023-12-02 20:53:41 | ||
FAKE-017 entered at 2023-12-02 20:53:41 | ||
FAKE-720 entered at 2023-12-02 20:53:41 | ||
FAKE-138 entered at 2023-12-02 20:53:41 | ||
FAKE-489 entered at 2023-12-02 20:53:41 | ||
FAKE-294 entered at 2023-12-02 20:53:41 | ||
FAKE-489 exited at 2023-12-02 20:53:41 | ||
FAKE-327 exited at 2023-12-02 20:53:41 |