使用zcl_lighting 如何根据colour X和colour Y 求出RGBW
static ZStatus_t zclLighting_ProcessInCmd_ColorControl_MoveToColor( zclIncoming_t *pInMsg,
zclLighting_AppCallbacks_t *pCBs )
{
if ( pCBs->pfnColorControl_MoveToColor )
{
zclCCMoveToColor_t cmd;
cmd.colorX = BUILD_UINT16( pInMsg->pData[0], pInMsg->pData[1] );
cmd.colorY = BUILD_UINT16( pInMsg->pData[2], pInMsg->pData[3] );
cmd.transitionTime = BUILD_UINT16( pInMsg->pData[4], pInMsg->pData[5] );
if ( ( cmd.colorX > LIGHTING_COLOR_CURRENT_X_MAX ) || ( cmd.colorY > LIGHTING_COLOR_CURRENT_Y_MAX ) )
{
return ( ZCL_STATUS_INVALID_VALUE );
}
return ( pCBs->pfnColorControl_MoveToColor( &cmd ) );
}
return ( ZFailure );
}
获取得到colourX和colour Y ,如何根据这两个值得到RGBW 四个灯的值
xy 到xyY,然后再到RGB,再转成RGBW
hwLight_UpdateLampColor( uint16 colorX, uint16 colorY, uint8 level)
hwLight_Convert_xyY_to_RGB
hwLight_RGB_to_RGBW
请问这几个函数在哪。没有找到
另外,SAT.HUE.LEVAL 如何转换为RGBW
你要的全在
C:\Texas Instruments\Z-Stack Lighting 1.0.2\Projects\zstack\ZLL\SampleApp\Source\Light\hw_light_ctrl.c
这里