aboutsummaryrefslogtreecommitdiffstats
path: root/Widgets/SteeringCtrlPage.py
diff options
context:
space:
mode:
authorsuchinton2001 <suchinton.2001@gmail.com>2023-10-15 23:30:36 +0530
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2023-10-19 16:19:32 +0000
commit20fe2d131df0041e121eccaf4fc58d4ac88dfbbc (patch)
treed555cd863e644014e9eb7a3fb9b759de246b6c2e /Widgets/SteeringCtrlPage.py
parente875973f63fc9a9582e957eb7264a4a589b78a97 (diff)
agl-demo-control-panel: Refactor Settings, Config and UI scaling
V1: - Add template to specify new configs in config.ini - Add drop-down to load all configurations specified in config.ini - Add new assets and refine UI elements (Scaling issue fixed) - Add size grip to main window - Add options in settings to configure port and AGL's CA.pem file - Removed unused or redundant files V2: - Check for user configs agl-demo-control-panel.ini & config.ini before resorting to default config.ini - Check for CA.pem and jwt tokens in default paths - Add new fields in settings for CA.pem file, jwt token path, TLS Server name - Fix crash in dashboard.py module due to icon.availableSizes() V3: Add Start/Stop states for the client V4: Block subscription event updates to the UI when values are changed on the control panel Bug-AGL: SPEC-4905 Signed-off-by: suchinton2001 <suchinton.2001@gmail.com> Change-Id: Id7883ba3bc88248dabb58d54e6e931f6d365fd54
Diffstat (limited to 'Widgets/SteeringCtrlPage.py')
-rw-r--r--Widgets/SteeringCtrlPage.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/Widgets/SteeringCtrlPage.py b/Widgets/SteeringCtrlPage.py
index 696c6c9..de3585d 100644
--- a/Widgets/SteeringCtrlPage.py
+++ b/Widgets/SteeringCtrlPage.py
@@ -18,9 +18,6 @@ import os
import sys
from PyQt5 import uic
from PyQt5.QtWidgets import QApplication, QButtonGroup
-from PyQt5.QtCore import QThread
-
-import time
current_dir = os.path.dirname(os.path.abspath(__file__))
@@ -120,6 +117,7 @@ class SteeringCtrlWidget(Base, Form):
self.PhoneHangup,
self.Voice,
self.LaneDeparture,
+ self.Horn,
self.CruiseEnable,
self.CruiseSet,
self.CruiseResume,
@@ -138,13 +136,12 @@ class SteeringCtrlWidget(Base, Form):
button_clicked = button.objectName()
signal_type = settings.Steering_Signal_Type
if signal_type == "Kuksa":
- self.feed_kuksa.send_values(self.Steering.switches[button_clicked]["Kuksa"], 1)
- self.feed_kuksa.send_values(self.Steering.switches[button_clicked]["Kuksa"], 0)
+ self.feed_kuksa.send_values(self.Steering.switches[button_clicked]["Kuksa"], "1")
+ self.feed_kuksa.send_values(self.Steering.switches[button_clicked]["Kuksa"], "0")
elif signal_type == "CAN":
feed_can.send_can_signal(self.Steering.switches[button_clicked]["CAN"])
# Making sure button state goes back to off
feed_can.send_can_signal("021#FFFFFFFF00000000")
- print(button_clicked + " button clicked")
if __name__ == '__main__':
import sys