Skip to content

Commit

Permalink
Fix AppConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
amnonpaz committed Oct 5, 2024
1 parent ac3521b commit 5fd9fc4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions mrobot_controller/app_config/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ def __init__(self, config_file: str):
self.config = {
'video': {
'device': "/dev/video0",
'width': 1920,
'height': 1080,
'host': 'localhost',
'port': 5555,
'width': 640,
'height': 480,
'test': False
},
'app-server': {
Expand Down Expand Up @@ -58,6 +56,11 @@ def log_values(self):
self.logger.info(line)

def __repr__(self):
return (f'Video:\n Device: {self.device}\n Width: {self.width}\n Height: {self.height}\n Test: {self.test}\n'
f'Server:\n Port: {self.port}')
return (f'Video:\n'
f' Device: {self.config['video']['device']}\n'
f' Width: {self.config['video']['width']}\n'
f' Height: {self.config['video']['height']}\n'
f' Test: {self.config['video']['test']}\n'
f'Server:\n'
f' Port: {self.config['app-server']['port']}')

0 comments on commit 5fd9fc4

Please sign in to comment.