summaryrefslogtreecommitdiffstats
path: root/recipes-platform/images
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-03-21 17:03:07 -0400
committerScott Murray <scott.murray@konsulko.com>2022-03-21 17:17:00 -0400
commitbca788b0e5dc96ec8f8d3bf6ddf3fd0fd9c0f92c (patch)
treed24824809b19e0fb996abc899d175bd5a1b849b2 /recipes-platform/images
parentfdadccd28a38eb9aae90f2871fbd901ac73613c2 (diff)
Restore Qt compositor cluster demo image
Changes: - Added the required backend plugin options for running with Qt's compositor to the PACKAGECONFIG variable in the qtbase recipe bbappend. - Restore an updated recipe for the agl-cluster-demo-qtcompositor image, with updates to the associated packagegroups for the app framework removal. - As part of the above, the duplication of the profile-cluster-qt5 package naming has been clarified in the qt5 versus qtcompositor packagegroups with new -wayland and -egl suffixes, with the previous plain -qt5 name aliasing the wayland option to maintain expected behavior. This avoids packaging conflict errors if building both types of cluster demo image in the same tree. - Restore updated cluster-gauges-qtcompositor recipe required for the image. - A simple systemd unit file has been added for the cluster-gauges application and is currently installed as a system session unit. Some rework of the agl-session scheme is required to run as a user unit, the intent is to address that in one of the 13.0.x point releases. Bug-AGL: SPEC-4283 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Id79484c025fef067d7d47eaf783768e700a9dc8d
Diffstat (limited to 'recipes-platform/images')
-rw-r--r--recipes-platform/images/agl-cluster-demo-qtcompositor.bb23
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes-platform/images/agl-cluster-demo-qtcompositor.bb b/recipes-platform/images/agl-cluster-demo-qtcompositor.bb
new file mode 100644
index 000000000..a9da97639
--- /dev/null
+++ b/recipes-platform/images/agl-cluster-demo-qtcompositor.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "AGL Cluster Demo Qtwayland Compositor image currently contains a \
+simple cluster interface and some AGL service."
+
+LICENSE = "MIT"
+
+require recipes-platform/images/agl-image-boot.inc
+
+IMAGE_FEATURES += "splash package-management ssh-server-dropbear"
+
+inherit features_check
+
+REQUIRED_DISTRO_FEATURES = "wayland"
+
+# add packages for cluster demo qtcompositor
+IMAGE_INSTALL:append = " \
+ packagegroup-agl-cluster-demo-qtcompositor \
+"
+
+# NOTE: This should be revisited after upgrading to hardknott or later,
+# as it may no longer be required. However, since Wayland is not
+# being used, the new "weston" image feature may not be a viable
+# option.
+SYSTEMD_DEFAULT_TARGET = "graphical.target"
ass="nx">template; var page = { speed: 0, tires: { front: { left: 21, right: 22 }, rear: { left: 23, right: 24 } }, rpm: { value: 0, percent: 0 }, isWarning: true, fuel: { percent: 100, level: 14, range: 650, avg: 25.5 } }; export function show() { document.body.innerHTML = Mustache.render(template, page); } export function init() { lowcan.list().then( function( result ) { console.log(result.length); for( var i=0;i<result.length; i++) { if( result[i].startsWith('messages') ) { (function(event) { lowcan.get(event).then( function( result ) { console.log(result[0].event, result[0].value); }, function(error){ console.error(event, error); }); })(result[i]); } } }, function(error){ console.error(error); }); load_template('main.template.html').then(function(result) { template = result; Mustache.parse(template); show(); }, function(error) { console.error('ERRROR loading main template', error); }); } export function simulate() { console.log('SIMULATE'); var counter = 0; var interval = setInterval(function() { counter ++; if( page.speed < 60 ) { page.speed += Math.floor(Math.random()*10); if( page.rpm.percent < 80 ) { page.rpm.percent += Math.floor(Math.random()*25); } else { page.rpm.percent = 40; } } else if (Math.random() > 0.5 ) { page.speed += Math.floor(Math.random()*10); page.rpm.percent = Math.min(80, Math.floor(Math.random()*90)); } else { page.speed -= Math.floor(Math.random()*10); page.rpm.percent = Math.min(80, Math.floor(Math.random()*90)); } page.fuel.percent = Math.round(page.fuel.percent - 0.01); page.fuel.level = Math.round(page.fuel.level - 0.01); page.fuel.range = Math.round(page.fuel.range - 0.01); show(); if( counter > 600 ) { clearInterval(interval); } }, 1000); }