From 09685d46eb838a67fb0efc3973ee3f776b4ef556 Mon Sep 17 00:00:00 2001 From: ori Date: Fri, 26 Apr 2019 21:56:40 +0300 Subject: [PATCH] updated settings manager and integrated naming with UI --- backend/Main.py | 6 +++--- backend/app/classes/SettingsManager.py | 13 ++++++++++++- chameleon-client/src/components/SystemTab.vue | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/backend/Main.py b/backend/Main.py index 0a23104a5..262f5e60e 100644 --- a/backend/Main.py +++ b/backend/Main.py @@ -8,9 +8,9 @@ from app.handlers.VisionHandler import VisionHandler if __name__ == "__main__": mng = SettingsManager() - a = CamerasHandler.get_cameras_info() - b = CamerasHandler.get_or_start_cameras(a) - VisionHandler().run() + # a = CamerasHandler.get_cameras_info() + # b = CamerasHandler.get_or_start_cameras(a) + # VisionHandler().run() tornado.options.parse_command_line() app = ChameleonApplication() diff --git a/backend/app/classes/SettingsManager.py b/backend/app/classes/SettingsManager.py index ee3b6dab6..322be0264 100644 --- a/backend/app/classes/SettingsManager.py +++ b/backend/app/classes/SettingsManager.py @@ -13,12 +13,23 @@ class SettingsManager(metaclass=Singleton): default_pipeline = { "exposure": 50, "brightness": 50, + "orientation": "Normal", + "resolution": [320, 160], "hue": [0, 100], "saturation": [0, 100], - "value": [0, 100] + "value": [0, 100], + "erode": False, + "dilate": False, + "area": [0, 100], + "ratio": [0, 20], + "extent": [0, 100] } default_general_settings = { "team_number": 1577, + "connection_type": "DHCP", + "ip": "", + "gateway": "", + "hostname": "Chameleon-Vision", "curr_camera": "", "curr_pipeline": "" } diff --git a/chameleon-client/src/components/SystemTab.vue b/chameleon-client/src/components/SystemTab.vue index 8e420b3f6..b85415f05 100644 --- a/chameleon-client/src/components/SystemTab.vue +++ b/chameleon-client/src/components/SystemTab.vue @@ -70,7 +70,7 @@ methods: { socketSendAll: function(){ this.$socket.sendObj([ - {'teamValue':this.teamNum}, + {'team_number':this.teamNum}, {'connectionType':this.connectionType}, {'ip':this.ip}, {'gateWay':this.gateWay},