Your project

1.       Your project

1.1   The Tool

流程图,需要在view和statemachine中间穿梭,变量和event两边窜。

Hard tofind where the animation plays

Namingrules!

1.2   Cluster Architect

1.2.1         templates used

AnalogSpeedLimitIndicator

AnalogSpeedRpmIndicators--  Cluster.Cluster2D.SpeedRpmIndicators

SpeedRPMAnim -- Cluster.SpeedRPMAnim

扫描二维码关注公众号,回复: 1000973 查看本文章

1.2.2         Templatedetails

1.2.2.1    AnalogSpeedRpmIndicators

1).  AnalogSpeedRmpIndicators.Speed.doUpdate

v:this.rotationAngleZ= -((260.5 / v:this.speedMaxValue * v:this.speedCurrent) - 130.4);

2). Cluster.Cluster2D.SpeedRpmIndicators.Speed.speedCurrent

Linked toCluster.SpeedRPMAnim.SpeedAnim.value.target

1.2.2.2    SpeedRPMAnim and its use in Cluster

Conditional action calls animation_play, inimationinitial value is defined in onPlay, each curve ends, onTerminate initializenext curve value.

1). SpeedRPMAnim.SpeedAnimconditional action:

v:this.step =0;

v:this->value.target= v:this.valueList[0];

f:animation_play(v:this);

2). SpeedRPMAnim.SpeedAnimattri butes

internalTarget

showMiles

valueList

timeList

3). onPlay

v:this->value.duration= v:this.timeList[v:this.step+1]-v:this.timeList[v:this.step];

v:this->value.start= v:this->value.target; // v:this.valueList[v:this.step];

v:this->value.end= v:this.valueList[v:this.step+1];

if(v:this.showMiles && v:this->value.end > 193.23) // max value formiles

  v:this->value.end = 193.23;

4).updateTarget

v:this.value_target= if( v:this.showMiles ) v:this.internalTarget*0.621 elsev:this.internalTarget;

5).onTerminate

if((v:this.step+2)<length v:this.timeList)

{

  if(v:this.runSimulation)

  {

    v:this.step += 1;

    f:animation_play(v:this);  {}

  }

}

else

{

  v:this.onFinished(); {}

}

6). onFinished

Fire ev: SIMULATION_START

1.3   Animation

1.3.1         Sleep Mode

1.3.2         StartupAnimation

1.3.3         boot animation--AnimActivateCluster

Target:Cluster.Cluster3D.Case3D.rotationAngleX

Range: -85.0~0

startAnimation

trigger-v:this->activate, true by conditional action.

onTrigger: f:animation_play


1.4   Global conditional action

1.4.1         Switch mode

If Eventtrigger:HK_SWITCH_MODE_PRESS

Then action:Fire event ‘MODE_SWITCH’

1.4.2         Autorun demomodus

IF: Eventtrigger: DEMOMODUS_START

Then action(demosequence): let v:t = 0::int32_t in

{

// reset

v:t += 500;           fire_delayed v:t, ev:RESET();

// activatecluster

v:t += 2000;         fire_delayed v:t,ev:HK_POWER_PRESS(dp:CONST_DISPLAYID,0,0,0);

// Media

v:t += 3000;         fire_delayed v:t,ev:HK_UP_PRESS(dp:CONST_DISPLAYID,0,0,0);

// Nav

……



1.5   Open issue

猜你喜欢

转载自blog.csdn.net/kong5461/article/details/52516148