Skip to content

Commit 3f3f3ad

Browse files
feat: add detector selector on main
1 parent 32e78fb commit 3f3f3ad

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

main.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from core.strategies.wifi.ipaddress_strategy import IpAddressStrategy
99
from core.strategies.eye.camera_strategy import CameraStrategy
1010
from core.strategies.notifier.whatsapp_strategy import WhatsappStrategy
11+
from core.strategies.detectors.hog_descriptor_strategy import HogDescriptorStrategy
1112
from core.utils.datatypes import WhatsappReciever, Protector
1213

1314

@@ -25,13 +26,13 @@ def main():
2526
"""
2627
This method is the entry point of the application.
2728
"""
28-
# Create a Whatsapp notifier.
29+
# Create a WhatsApp notifier.
2930
whatsapp_notifier = WhatsappStrategy()
30-
whatsapp_notifier.add_reciever(WhatsappReciever("Gokhan", "+905555555555"))
31+
whatsapp_notifier.add_reciever(WhatsappReciever("Gokhan", "+90555555555", "xxxxxx"))
3132

3233
# Create a Protector within IpAddressStrategy.
3334
ip_address_strategy = IpAddressStrategy()
34-
ip_address_strategy.add_protector(Protector("Gokhan_iPhone", "192.168.X.X"))
35+
ip_address_strategy.add_protector(Protector("Gokhan_iPhone", "192.168.1.65"))
3536

3637
# Create observer.
3738
hss_observer = HomeSecuritySystemObserver()
@@ -45,7 +46,9 @@ def main():
4546

4647
# Run subjects.
4748
wifi_subject.run(ip_address_strategy)
48-
eye_subject.run(CameraStrategy(0))
49+
camera = CameraStrategy(0)
50+
camera.set_detector(HogDescriptorStrategy())
51+
eye_subject.run(camera)
4952

5053

5154
if __name__ == "__main__":

0 commit comments

Comments
 (0)