diff options
author | Suchinton Chakravarty <suchinton.2001@gmail.com> | 2024-10-15 23:57:36 +0530 |
---|---|---|
committer | Suchinton Chakravarty <suchinton.2001@gmail.com> | 2024-10-22 16:09:43 +0530 |
commit | 6fdddee7d45206dc64eacd08700f79566ad9b4a6 (patch) | |
tree | 7d688595f69cdb7d7484f37542059d7406da28c5 /extras | |
parent | 2e2dd79e41b27a1d50be3c118955cdbd76e65539 (diff) |
Fix Visual Bugs and Add options for Keypad input
- Fixed spin wheel input alignment for HVAC controls
- Minor tweaks to Gauge input, Added new tick marks and improved gradient
- Adding option(s) in config to handle Keypad input settings
- Reconnect QML signals to enable two way input for Speed, RPM and other QML elements
- Refactor and Add CLI option to start and stop playback.
- Make Tire Pressure Dock into floating window and align to screen center.
- Update resources to include keypad icons.
- Add new tile for Keypad inputs
Bug-AGL: SPEC-5161
Change-Id: I1ecefdfd114ecad081c138e74c1598907d91fd23
Signed-off-by: Suchinton Chakravarty <suchinton.2001@gmail.com>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/config.ini | 7 | ||||
-rw-r--r-- | extras/config.py | 19 |
2 files changed, 26 insertions, 0 deletions
diff --git a/extras/config.ini b/extras/config.ini index 409de83..d88dee9 100644 --- a/extras/config.ini +++ b/extras/config.ini @@ -7,6 +7,13 @@ file-playback-path = dbc-file-path = can-interface = +[keypad-feature] +enabled = false +keypad-only = false +ip = +port = +keys-to-hide = 3 + [vss-server] ip = localhost port = 55555 diff --git a/extras/config.py b/extras/config.py index 8df3497..4cff839 100644 --- a/extras/config.py +++ b/extras/config.py @@ -158,6 +158,25 @@ def save_config(new_config, auth_token, CA_File=None): config.write(configfile) +# check the keypad-features wanted + +def keypad_enabled(): + return config.getboolean('keypad-feature', 'enabled', fallback=False) + +def keypad_only(): + return config.getboolean('keypad-feature', 'keypad-only', fallback=False) + +def get_keypad_config(): + # return the ip and port of the keypad if specified, else return localhost and 8080 + ip = config.get('keypad-feature', 'ip', fallback=False) + port = config.get('keypad-feature', 'port', fallback=False) + return ip if ip else "localhost", port if port else "8080" + +def get_keypad_keys_to_hide(): + # return the keys to hide if specified, else return an empty + keys = config.get('keypad-feature', 'keys-to-hide', fallback=False) + return keys.split(',') if keys else [] + def fullscreen_mode(): return config.getboolean('default', 'fullscreen-mode', fallback=False) |