From 2e2dd79e41b27a1d50be3c118955cdbd76e65539 Mon Sep 17 00:00:00 2001 From: Suchinton Chakravarty Date: Thu, 10 Oct 2024 18:16:07 +0530 Subject: Add Tire Pressure, Keypad elements and misc. UI Changes - Increased slider grab handle size - Add floating menu for Tire Pressure UI - Show errow in Playback toggle when CAN interface is not available - Update Half gauges to show Unit and logo correctly - Update App resources - Add new tumbler input for HVAC temp - Add new get function to KuksaClient to get Tire Pressure unit and Current value to increment Fixes: - Check for vcar dbc file at '/etc/kuksa-dbc-feeder/' - Increase font size in Settings page - Allow for tumbler/ spin wheel values to wrap around Bug-AGL: SPEC-5161 Change-Id: I2386bf7dc762b09b83cef1be104a35d6afc0a704 Signed-off-by: Suchinton Chakravarty --- extras/config.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'extras/config.py') diff --git a/extras/config.py b/extras/config.py index 7540e61..8df3497 100644 --- a/extras/config.py +++ b/extras/config.py @@ -67,6 +67,12 @@ PLAYBACK_FILE_PATHS = check_paths( os.path.abspath(os.path.join(os.path.dirname(__file__), "../assets/can_messages.txt")) ) +DBC_FILE_PATHS = check_paths( + config.get('default', 'dbc-file-path', fallback=None), + "/etc/kuksa-dbc-feeder/agl-vcar.dbc", + os.path.abspath(os.path.join(os.path.dirname(__file__), "../Scripts/agl-vcar.dbc")) +) + CA_PATH = next((path for path, exists in CA_PATHS.items() if exists), None) WS_TOKEN = next((path for path, exists in WS_TOKEN_PATHS.items() if exists), None) GRPC_TOKEN = next((path for path, exists in GRPC_TOKEN_PATHS.items() if exists), None) @@ -177,7 +183,14 @@ def get_playback_file(): config.write(configfile) return os.path.join(os.path.dirname(__file__), "can_messages.txt") - + +# Function to get the dbc file path from config.ini +def get_dbc_file(): + if DBC_FILE_PATHS: + return DBC_FILE_PATHS + else: + raise ValueError("DBC file path not found") + # Function to get the can interface name from config.ini def get_can_interface(): print(config.get('default', 'can-interface', fallback=None)) -- cgit 1.2.3-korg