@@ -8,19 +8,19 @@ The `Controller` class acts as a **Facade** for the traffic and pedestrian cross
88Controller(
99 ped_red,
1010 ped_green,
11- car_red ,
12- car_amber ,
13- car_green ,
11+ traffic_red ,
12+ traffic_amber ,
13+ traffic_green ,
1414 button,
1515 buzzer,
1616 debug = False
1717)
1818```
1919- ` ped_red ` (` Led_Light ` ): Red pedestrian light
2020- ` ped_green ` (` Led_Light ` ): Green pedestrian light
21- - ` car_red ` (` Led_Light ` ): Red traffic light
22- - ` car_amber ` (` Led_Light ` ): Amber traffic light
23- - ` car_green ` (` Led_Light ` ): Green traffic light
21+ - ` traffic_red ` (` Led_Light ` ): Red traffic light
22+ - ` traffic_amber ` (` Led_Light ` ): Amber traffic light
23+ - ` traffic_green ` (` Led_Light ` ): Green traffic light
2424- ` button ` (` Pedestrian_Button ` ): Pedestrian crossing button
2525- ` buzzer ` (` Audio_Notification ` ): Crossing buzzer
2626- ` debug ` (` bool ` , optional): Enable debug output (default ` False ` )
@@ -34,16 +34,16 @@ from audio_notification import Audio_Notification
3434from controller import Controller
3535import time
3636
37- car_red = Led_Light(3 , debug = False )
38- car_amber = Led_Light(5 , debug = False )
39- car_green = Led_Light(7 , debug = False )
37+ traffic_red = Led_Light(3 , debug = False )
38+ traffic_amber = Led_Light(5 , debug = False )
39+ traffic_green = Led_Light(7 , debug = False )
4040ped_red = Led_Light(17 , debug = False )
4141ped_green = Led_Light(19 , debug = False )
4242button = Pedestrian_Button(22 , debug = False )
4343buzzer = Audio_Notification(27 , debug = False )
4444
4545controller = Controller(
46- ped_red, ped_green, car_red, car_amber, car_green ,
46+ ped_red, ped_green, traffic_red, traffic_amber, traffic_green ,
4747 button, buzzer, debug = True
4848)
4949
@@ -88,16 +88,16 @@ from audio_notification import Audio_Notification
8888from controller import Controller
8989from time import sleep
9090
91- car_red = Led_Light(3 , debug = True )
92- car_amber = Led_Light(5 , debug = True )
93- car_green = Led_Light(7 , debug = True )
91+ traffic_red = Led_Light(3 , debug = True )
92+ traffic_amber = Led_Light(5 , debug = True )
93+ traffic_green = Led_Light(7 , debug = True )
9494ped_red = Led_Light(17 , debug = True )
9595ped_green = Led_Light(19 , debug = True )
9696button = Pedestrian_Button(22 , debug = True )
9797buzzer = Audio_Notification(27 , debug = True )
9898
9999controller = Controller(
100- ped_red, ped_green, car_red, car_amber, car_green ,
100+ ped_red, ped_green, traffic_red, traffic_amber, traffic_green ,
101101 button, buzzer, debug = True
102102)
103103
@@ -302,9 +302,9 @@ class Controller:
302302 self ,
303303 ped_red ,
304304 ped_green ,
305- car_red ,
306- car_amber ,
307- car_green ,
305+ traffic_red ,
306+ traffic_amber ,
307+ traffic_green ,
308308 button ,
309309 buzzer ,
310310 debug = False ,
@@ -315,16 +315,16 @@ class Controller:
315315 Args:
316316 ped_red (Led_Light): Red pedestrian light
317317 ped_green (Led_Light): Green pedestrian light
318- car_red (Led_Light): Red traffic light
319- car_amber (Led_Light): Amber traffic light
320- car_green (Led_Light): Green traffic light
318+ traffic_red (Led_Light): Red traffic light
319+ traffic_amber (Led_Light): Amber traffic light
320+ traffic_green (Led_Light): Green traffic light
321321 button (Pedestrian_Button): Pedestrian crossing button
322322 buzzer (Audio_Notification): Crossing buzzer
323323 debug (bool, optional): Enable debug output. Defaults to False.
324324 """
325325 # Initialize subsystems
326326 self .__traffic_lights = TrafficLightSubsystem(
327- car_red, car_amber, car_green , debug
327+ traffic_red, traffic_amber, traffic_green , debug
328328 )
329329 self .__pedestrian_signals = PedestrianSubsystem(
330330 ped_red, ped_green, button, buzzer, debug
0 commit comments