I used the function eCLD_OnOffCommandOnWithTimedOffSend to implemente OnWithTimedOff . When I added essential code to the application , a E_CLD_ONOFF_CMD_ON_TIMED_OFF event can be received and the led switched to on ,but it can not switch-off after a timed period. Why?
eCLD_OnOffUpdate: OnTime=4 OffWaitTime=5 On=1Update Id 0006
[23:59:23.748]收←◆
eCLD_OnOffUpdate: OnTime=3 OffWaitTime=5 On=1Update Id 0006
[23:59:23.873]收←◆
eCLD_OnOffUpdate: OnTime=2 OffWaitTime=5 On=1Update Id 0006
[23:59:23.951]收←◆
eCLD_OnOffUpdate: OnTime=1 OffWaitTime=5 On=1Update Id 0006
[23:59:24.076]收←◆
eCLD_OnOffUpdate: OnTime=0 OffWaitTime=0 On=0Update Id 0006
u8OnOff值为1的时候,灯能被点亮,然后就一直亮着。我做了一个测试,加了一个定时器,Router接收到指令后,定时器开始计时,等u16OnTime到期之后,定时器回调函数调用APP_vSetLed( sBaseDevice.sOnOffServerCluster.bOnOff); 灯会熄灭。
也就是说,Router接收到指令,并计时结束后,bOnOff已经更新为0,但没有相应的指令再次调用APP_vSetLed( sBaseDevice.sOnOffServerCluster.bOnOff)这个函数。