This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

什么是平滑过渡

1.第一static void zclSampleLight_MoveBasedOnRate( uint8 newLevel, uint32 rate )
{
  uint32 diff;

  // determine how much time (in 10ths of seconds) based on the difference and rate 根据差值和速率来确定时间
  zclSampleLight_Rate32 = rate;
  diff = zclSampleLight_TimeRateHelper( newLevel );
  zclSampleLight_LevelRemainingTime = diff / rate;
  if ( !zclSampleLight_LevelRemainingTime )
  {
    zclSampleLight_LevelRemainingTime = 1;
  }

  osal_start_timerEx( zclSampleLight_TaskID, SAMPLELIGHT_LEVEL_CTRL_EVT, 100 );
}
请问一下这个函数的作用是什么,还有什么是平滑过渡呢,他在zigbee中有什么作用?
2.第二// Toggle the light
  else if ( cmd == COMMAND_TOGGLE )
  {
#ifdef ZCL_LEVEL_CTRL
    if (zclSampleLight_LevelRemainingTime > 0) 
    {
      if (zclSampleLight_NewLevelUp)
      {
        OnOff = LIGHT_OFF;
      }
      else
      {
        OnOff = LIGHT_ON;
      }
    }
    else
    {
      if (zclSampleLight_OnOff == LIGHT_ON)
      {
        OnOff = LIGHT_OFF;
      }
      else
      {
        OnOff = LIGHT_ON;
      }
    }在这个灯转换中
zclSampleLight_LevelRemainingTime 他的作用又是什么呢。。请ti的大神们指导一下,谢谢