Commit 9786f3aa authored by Tomi Korpipää's avatar Tomi Korpipää

Update kria cluster to 2.0 API

parent 8bdb8524
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<Add ref="#CarBottom" diffuse="0.101961 0.101961 0.101961" importfile=".\Car\Car.import" shaderlighting="None" /> <Add ref="#CarBottom" diffuse="0.101961 0.101961 0.101961" importfile=".\Car\Car.import" shaderlighting="None" />
<Add ref="#Interior" diffuse="0.0901961 0.0901961 0.0901961" importfile=".\Car\Car.import" /> <Add ref="#Interior" diffuse="0.0901961 0.0901961 0.0901961" importfile=".\Car\Car.import" />
<Add ref="#body" importfile=".\Car\Car.import" /> <Add ref="#body" importfile=".\Car\Car.import" />
<Add ref="#lambert2" bumpamount="1" diffuse="0.870588 0 0" fresnelPower="5" importfile=".\Car\Car.import" normalmap="#lambert2_normalmap" opacity="100" specularamount="2" specularmodel="Default" specularroughness="0.001" speculartint="0.298039 0.298039 0.298039" /> <Add ref="#lambert2" bumpamount="1" controlledproperty="$displayColor diffuse" diffuse="0.870588 0 0" fresnelPower="5" importfile=".\Car\Car.import" normalmap="#lambert2_normalmap" opacity="100" specularamount="2" specularmodel="Default" specularroughness="0.001" speculartint="0.298039 0.298039 0.298039" />
<Add ref="#lambert2_normalmap" sourcepath=".\Car\maps\outUV_normals.png" /> <Add ref="#lambert2_normalmap" sourcepath=".\Car\maps\outUV_normals.png" />
<Add ref="#Wheel_Back_Left" importfile=".\Car\Car.import" scale="90 38.141 38.141" > <Add ref="#Wheel_Back_Left" importfile=".\Car\Car.import" scale="90 38.141 38.141" >
<AnimationTrack property="rotation.x" type="EaseInOut" >0 720 0 0 8 0 0 0</AnimationTrack> <AnimationTrack property="rotation.x" type="EaseInOut" >0 720 0 0 8 0 0 0</AnimationTrack>
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<Add ref="#Layer" background="SolidColor" /> <Add ref="#Layer" background="SolidColor" />
<Add ref="#Camera" orthographic="True" /> <Add ref="#Camera" orthographic="True" />
<State id="Scene-Slide1" name="Slide1" > <State id="Scene-Slide1" name="Slide1" >
<Add ref="#speed" name="speed" font="TitilliumWeb-Regular" position="0 40 0" size="90" textstring="0" /> <Add ref="#speed" name="speed" controlledproperty="$speedText textstring" font="TitilliumWeb-Regular" position="0 40 0" size="90" textstring="0" />
<Add ref="#kmh" name="kmh" font="TitilliumWeb-Regular" position="0 -40 0" size="30" textstring="kph" /> <Add ref="#kmh" name="kmh" controlledproperty="$speedUnitSlide textstring" font="TitilliumWeb-Regular" position="0 -40 0" size="30" textstring="kph" />
</State> </State>
</State> </State>
</Logic> </Logic>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<Add ref="#Camera" orthographic="True" /> <Add ref="#Camera" orthographic="True" />
<State id="Scene-Slide1" name="Slide1" > <State id="Scene-Slide1" name="Slide1" >
<Add ref="#rpm" name="rpm" font="TitilliumWeb-Regular" position="0 -40 0" rotation="0 0 0" size="30" textstring="rpm x 1000" /> <Add ref="#rpm" name="rpm" font="TitilliumWeb-Regular" position="0 -40 0" rotation="0 0 0" size="30" textstring="rpm x 1000" />
<Add ref="#tacho" name="tacho" font="TitilliumWeb-Regular" opacity="99" position="0 40 0" size="90" textstring="0.0" /> <Add ref="#tacho" name="tacho" controlledproperty="$tachoText textstring" font="TitilliumWeb-Regular" opacity="99" position="0 40 0" size="90" textstring="0.0" />
</State> </State>
</State> </State>
</Logic> </Logic>
......
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<application> <application>
<assets initial="mainPresentation"> <assets initial="mainPresentation">
<presentation id="mainPresentation" src="mainPresentation.uip"/>
<presentation id="contentPresentation" src="contentPresentation.uip"/>
<presentation id="digitalSpeed" src="digitalSpeed.uip"/>
<presentation id="digitalTacho" src="digitalTacho.uip"/>
<presentation id="SpeedBackground" src="speedBackground.uip"/>
<presentation id="TachoBackground" src="tachoBackground.uip"/>
<presentation-qml id="navigationStream" args="../qml/Navigation.qml"/>
<dataInput name="mainSlide" type="String"/> <dataInput name="mainSlide" type="String"/>
<dataInput name="carSlide" type="String"/> <dataInput name="carSlide" type="String"/>
<dataInput name="colorSlide" type="String"/> <dataInput name="colorSlide" type="String"/>
...@@ -16,6 +9,14 @@ ...@@ -16,6 +9,14 @@
<dataInput name="speed" type="Ranged Number" min="0" max="260"/> <dataInput name="speed" type="Ranged Number" min="0" max="260"/>
<dataInput name="speedText" type="String"/> <dataInput name="speedText" type="String"/>
<dataInput name="tachoText" type="String"/> <dataInput name="tachoText" type="String"/>
<dataInput name="displayColor" type="Vector3"/>
<presentation id="mainPresentation" src="mainPresentation.uip"/>
<presentation id="contentPresentation" src="contentPresentation.uip"/>
<presentation id="digitalSpeed" src="digitalSpeed.uip"/>
<presentation id="digitalTacho" src="digitalTacho.uip"/>
<presentation id="SpeedBackground" src="speedBackground.uip"/>
<presentation id="TachoBackground" src="tachoBackground.uip"/>
<presentation-qml id="navigationStream" args="../qml/Navigation.qml"/>
</assets> </assets>
<statemachine ref="#logic"> <statemachine ref="#logic">
<visual-states> <visual-states>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<Effect id="VignetteEffect" name="VignetteEffect" sourcepath=".\VignetteEffect.effect" /> <Effect id="VignetteEffect" name="VignetteEffect" sourcepath=".\VignetteEffect.effect" />
</Classes> </Classes>
<Graph > <Graph >
<Scene id="Scene" backgroundcolor="0 0 0" controlledproperty="mainSlide @slide" > <Scene id="Scene" backgroundcolor="0 0 0" controlledproperty="$mainSlide @slide" >
<Layer id="Layer" > <Layer id="Layer" >
<Camera id="Camera" /> <Camera id="Camera" />
<Group id="Gaugesvol2" importid="__import__root__" > <Group id="Gaugesvol2" importid="__import__root__" >
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</Add> </Add>
<Add ref="#tachomat" bumpamount="1" diffusemap="#tachomat_diffusemap" emissivecolor="0 0 0" fresnelPower="1" importfile=".\Gauges\Gauges.import" shaderlighting="Pixel" specularamount="0.2" specularmodel="Default" specularroughness="0.001" speculartint="0.0627451 0.0627451 0.0627451" /> <Add ref="#tachomat" bumpamount="1" diffusemap="#tachomat_diffusemap" emissivecolor="0 0 0" fresnelPower="1" importfile=".\Gauges\Gauges.import" shaderlighting="Pixel" specularamount="0.2" specularmodel="Default" specularroughness="0.001" speculartint="0.0627451 0.0627451 0.0627451" />
<Add ref="#tachomat_diffusemap" sourcepath="Gauges/maps/tacho_new.jpg" subpresentation="TachoBackground" /> <Add ref="#tachomat_diffusemap" sourcepath="Gauges/maps/tacho_new.jpg" subpresentation="TachoBackground" />
<Add ref="#tachoNeedle" name="tachoNeedle" controlledproperty="tacho @timeline" endtime="1000" opacity="100" position="0 1 0" > <Add ref="#tachoNeedle" name="tachoNeedle" controlledproperty="$tacho @timeline" endtime="1000" opacity="100" position="0 1 0" >
<AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack> <AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack>
</Add> </Add>
<Add ref="#centerTacho" endtime="1000" importfile=".\Gauges\Gauges.import" position="0 1 -0" rotation="0 -0 0" sourcepath="GaugeCenter/meshes/centerTacho.mesh" > <Add ref="#centerTacho" endtime="1000" importfile=".\Gauges\Gauges.import" position="0 1 -0" rotation="0 -0 0" sourcepath="GaugeCenter/meshes/centerTacho.mesh" >
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
<AnimationTrack property="scale.z" type="EaseInOut" >0 1 0 0</AnimationTrack> <AnimationTrack property="scale.z" type="EaseInOut" >0 1 0 0</AnimationTrack>
</Add> </Add>
<Add ref="#lambert8_001" name="lambert8" endtime="1000" referencedmaterial="#lambert8" /> <Add ref="#lambert8_001" name="lambert8" endtime="1000" referencedmaterial="#lambert8" />
<Add ref="#speedNeedle" name="speedNeedle" controlledproperty="speed @timeline" endtime="1000" opacity="100" position="0 1 0" scale="1 1 1" > <Add ref="#speedNeedle" name="speedNeedle" controlledproperty="$speed @timeline" endtime="1000" opacity="100" position="0 1 0" scale="1 1 1" >
<AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack> <AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack>
<AnimationTrack property="scale.x" type="EaseInOut" >0 1 0 0</AnimationTrack> <AnimationTrack property="scale.x" type="EaseInOut" >0 1 0 0</AnimationTrack>
<AnimationTrack property="scale.y" type="EaseInOut" >0 1 0 0</AnimationTrack> <AnimationTrack property="scale.y" type="EaseInOut" >0 1 0 0</AnimationTrack>
...@@ -201,12 +201,12 @@ ...@@ -201,12 +201,12 @@
<Add ref="#Light_002" name="Light" brightness="250" castshadow="True" endtime="1000" expfade="0" lightambient="0.427451 0.427451 0.427451" lightdiffuse="0.901961 0.901961 0.901961" lightspecular="0.113725 0.109804 0.14902" lighttype="Point" linearfade="9.25926" position="0 48 -110" scale="4 1 1" shdwbias="0.032" shdwfactor="79.8333" shdwfilter="4.66667" shdwmapfar="1500" shdwmapres="10" /> <Add ref="#Light_002" name="Light" brightness="250" castshadow="True" endtime="1000" expfade="0" lightambient="0.427451 0.427451 0.427451" lightdiffuse="0.901961 0.901961 0.901961" lightspecular="0.113725 0.109804 0.14902" lighttype="Point" linearfade="9.25926" position="0 48 -110" scale="4 1 1" shdwbias="0.032" shdwfactor="79.8333" shdwfilter="4.66667" shdwmapfar="1500" shdwmapres="10" />
<Add ref="#Map" name="Content_Layer" background="Transparent" height="70" left="15" top="17" width="72" /> <Add ref="#Map" name="Content_Layer" background="Transparent" height="70" left="15" top="17" width="72" />
<Add ref="#Camera_002" orthographic="True" /> <Add ref="#Camera_002" orthographic="True" />
<Add ref="#Car" name="Car" controlledproperty="carSlide @slide" /> <Add ref="#Car" name="Car" controlledproperty="$carSlide @slide" />
<Add ref="#map" name="Navigation" opacity="100" scale="25.9751 9.54456 1" sourcepath="#Rectangle" > <Add ref="#map" name="Navigation" opacity="100" scale="25.9751 9.54456 1" sourcepath="#Rectangle" >
<AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack> <AnimationTrack property="opacity" type="EaseInOut" >0 100 0 0</AnimationTrack>
</Add> </Add>
<Add ref="#Material_001" diffusemap="#Material_001_diffusemap" shaderlighting="None" /> <Add ref="#Material_001" diffusemap="#Material_001_diffusemap" shaderlighting="None" />
<Add ref="#Material_001_diffusemap" sourcepath=".\Gauges\maps\map.jpg" subpresentation="navigationStream" /> <Add ref="#Material_001_diffusemap" sourcepath="Gauges/maps/map.jpg" subpresentation="navigationStream" />
<Add ref="#VignetteEffect_001" name="VignetteEffect" vig_color="0 0 0" vig_radius="1.01626" vig_strenght="15" /> <Add ref="#VignetteEffect_001" name="VignetteEffect" vig_color="0 0 0" vig_radius="1.01626" vig_strenght="15" />
<State id="Scene-2D" name="2D" playmode="Play Through To..." > <State id="Scene-2D" name="2D" playmode="Play Through To..." >
<Set ref="#Layer" endtime="1000" /> <Set ref="#Layer" endtime="1000" />
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<ImageBuffer sourcepath="Gauges/maps/gaugespeed_mph.png" hasTransparency="True" /> <ImageBuffer sourcepath="Gauges/maps/gaugespeed_mph.png" hasTransparency="True" />
</BufferData> </BufferData>
<Graph > <Graph >
<Scene id="Scene" controlledproperty="speedUnitSlide @slide" > <Scene id="Scene" controlledproperty="$speedUnitSlide @slide" >
<Layer id="Layer" > <Layer id="Layer" >
<Camera id="Camera" /> <Camera id="Camera" />
<Model id="speed_mph_new" > <Model id="speed_mph_new" >
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</Add> </Add>
<Add ref="#Material_001" diffusemap="#Material_001_diffusemap" shaderlighting="None" /> <Add ref="#Material_001" diffusemap="#Material_001_diffusemap" shaderlighting="None" />
<Add ref="#Material_001_diffusemap" sourcepath="Gauges/maps/gaugespeed_kph.png" /> <Add ref="#Material_001_diffusemap" sourcepath="Gauges/maps/gaugespeed_kph.png" />
<Add ref="#gaugespeed_background" name="gaugespeed_background" controlledproperty="colorSlide @slide" /> <Add ref="#gaugespeed_background" name="gaugespeed_background" controlledproperty="$colorSlide @slide" />
<State id="Scene-kph" name="kph" playmode="Stop at end" > <State id="Scene-kph" name="kph" playmode="Stop at end" >
<Set ref="#Layer" endtime="1000" /> <Set ref="#Layer" endtime="1000" />
<Set ref="#Camera" endtime="1000" /> <Set ref="#Camera" endtime="1000" />
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</Add> </Add>
<Add ref="#Material" diffusemap="#Material_diffusemap" shaderlighting="None" /> <Add ref="#Material" diffusemap="#Material_diffusemap" shaderlighting="None" />
<Add ref="#Material_diffusemap" sourcepath="Gauges/maps/gaugetacho.png" /> <Add ref="#Material_diffusemap" sourcepath="Gauges/maps/gaugetacho.png" />
<Add ref="#gaugespeed_background" name="gaugetacho_background" controlledproperty="colorSlide @slide" /> <Add ref="#gaugespeed_background" name="gaugetacho_background" controlledproperty="$colorSlide @slide" />
<State id="Scene-Tacho" name="Tacho" playmode="Stop at end" > <State id="Scene-Tacho" name="Tacho" playmode="Stop at end" >
<Set ref="#Layer" endtime="1000" /> <Set ref="#Layer" endtime="1000" />
<Set ref="#Camera" endtime="1000" /> <Set ref="#Camera" endtime="1000" />
......
...@@ -54,12 +54,12 @@ OverlayContainerForm { ...@@ -54,12 +54,12 @@ OverlayContainerForm {
id: indicatorContainer id: indicatorContainer
// Safety critical icons // Safety critical icons
property bool parkBrake: startupAnimation ? true : false property bool parkBrake: mainview.startupAnimation ? true : false
property bool flatTire: startupAnimation ? true : false property bool flatTire: mainview.startupAnimation ? true : false
property bool fuelLevel: startupAnimation ? true : false property bool fuelLevel: mainview.startupAnimation ? true : false
property bool seatbelt: startupAnimation ? true : false property bool seatbelt: mainview.startupAnimation ? true : false
property bool oilLevel: startupAnimation ? true : false property bool oilLevel: mainview.startupAnimation ? true : false
property bool brakeFailure: startupAnimation ? true : false property bool brakeFailure: mainview.startupAnimation ? true : false
// Icon colors // Icon colors
property string offIconColor: "#222324" property string offIconColor: "#222324"
......
...@@ -62,7 +62,7 @@ Item { ...@@ -62,7 +62,7 @@ Item {
SequentialAnimation { SequentialAnimation {
id: animation id: animation
running: !startupAnimation running: !mainview.startupAnimation
loops: Animation.Infinite loops: Animation.Infinite
PropertyAnimation { PropertyAnimation {
...@@ -85,7 +85,7 @@ Item { ...@@ -85,7 +85,7 @@ Item {
} }
Timer { Timer {
running: !startupAnimation running: !mainview.startupAnimation
property bool turnLeft: true property bool turnLeft: true
repeat: true repeat: true
interval: 5000 interval: 5000
......
...@@ -110,42 +110,38 @@ Item { ...@@ -110,42 +110,38 @@ Item {
} }
DataInput { DataInput {
id: tachometerNeedle
name: "tacho" name: "tacho"
value: simuData.rpm value: simuData.rpm
} }
DataInput { DataInput {
id: tachometerText
name: "tachoText" name: "tachoText"
value: (simuData.rpm / 1000.0).toFixed(1) value: (simuData.rpm / 1000.0).toFixed(1)
} }
DataInput { DataInput {
id: speedometerNeedle
name: "speed" name: "speed"
value: simuData.speed value: simuData.speed
} }
DataInput { DataInput {
id: speedometerText
name: "speedText" name: "speedText"
value: useMetric ? simuData.speed.toFixed(0) : (simuData.speed / 1.625).toFixed(0) value: useMetric ? simuData.speed.toFixed(0) : (simuData.speed / 1.625).toFixed(0)
} }
DataInput { DataInput {
id: displayColor
name: "colorSlide" name: "colorSlide"
value: redTheme ? "red" : "blue"
} }
DataInput { DataInput {
id: speedometerUnit
name: "speedUnitSlide" name: "speedUnitSlide"
value: useMetric ? "kph" : "mph"
} }
Element { DataInput {
id: carBodyMaterial name: "displayColor"
elementPath: "contentPresentation:Scene.Layer.Car.Car.body.lambert2" value: redTheme ? Qt.vector3d(0.855, 0.14, 0.144) : Qt.vector3d(0.08, 0.08, 1.0)
} }
SubPresentationSettings { SubPresentationSettings {
...@@ -194,27 +190,6 @@ Item { ...@@ -194,27 +190,6 @@ Item {
visible: false visible: false
} }
onRedThemeChanged: {
if (redTheme) {
carBodyMaterial.setAttribute("diffuse.r", 0.855);
carBodyMaterial.setAttribute("diffuse.g", 0.14);
carBodyMaterial.setAttribute("diffuse.b", 0.144);
displayColor.setValue("red");
} else {
carBodyMaterial.setAttribute("diffuse.r", 0.08);
carBodyMaterial.setAttribute("diffuse.g", 0.08);
carBodyMaterial.setAttribute("diffuse.b", 1.0);
displayColor.setValue("blue");
}
}
onUseMetricChanged: {
if (useMetric)
speedometerUnit.setValue("kph");
else
speedometerUnit.setValue("mph");
}
Keys.onRightPressed: { Keys.onRightPressed: {
userActivity(); userActivity();
menuSelect(true); menuSelect(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment