summaryrefslogtreecommitdiffstats
path: root/app/main.cpp
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-06-07 15:33:50 -0400
committerScott Murray <scott.murray@konsulko.com>2022-06-07 15:43:22 -0400
commit202cc44bc311a20a7016759d1a4e7bcba6064f7d (patch)
tree23501093ffb20f2e98b18431e81472171bc3dd6b /app/main.cpp
parent00fa784cdb2570f742511820b885b1c3e18b6d01 (diff)
Add VIS vehicle signal support
Use the new VehicleSignals API from libqtappfw to replace the previous signal-composer usage. Additionally, the default unit for the vehicle speed has been switched to kilometers with switching driven by the appropriate VSS schema value. Bug-AGL: SPEC-4409 Change-Id: I3c40ea004e1c66e9775865aaa424e24778cb0f53 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 14c2ead..3d02a51 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -35,6 +35,8 @@
#include <wayland-client.h>
#include "agl-shell-client-protocol.h"
+#include <vehiclesignals.h>
+
// Global indicating whether canned animation should run
bool runAnimation = true;
@@ -170,6 +172,9 @@ int main(int argc, char *argv[])
QQmlContext *context = engine.rootContext();
context->setContextProperty("runAnimation", runAnimation);
+ VehicleSignalsConfig vsConfig(myname);
+ context->setContextProperty("VehicleSignals", new VehicleSignals(vsConfig));
+
QQmlComponent bg_comp(&engine, QUrl("qrc:/cluster-gauges.qml"));
qDebug() << bg_comp.errors();
struct wl_surface *bg = create_component(native, &bg_comp, screen, &qobj_bg);