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-08 12:21:20 +0000
commit7a9e20aa0bf5096a0dcd2d9b321b616576b210ac (patch)
tree3a658c60ce9ebdfbd73906aced1b743510628ca0 /app/main.cpp
parent3e839e0a21b653411b37a6ac94da891fe5c7543d (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);