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

 

 

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值