Other Parts Discussed in Thread: Z-STACK
Why does the function not use MIN_LQI_COST_2, MIN_LQI_COST_4, MIN_LQI_COST_6?
Does it make sense to add them to get more accurate "cost"?
/*********************************************************************
* @fn nwkConvertLqiToCost
*
* @brief Convert Link Qualiy valuel (lqi 1~255) to link cost (1~7)
*
* @param lqi - link quality value
*
* @return uint8_t - link cost
*/
uint8_t nwkConvertLqiToCost( uint8_t lqi )
{
uint8_t cost;
cost = MAX_LINK_COST ;
if ( lqi > MIN_LQI_COST_1 )
{
cost = 1;
}
else if ( lqi > MIN_LQI_COST_3 )
{
cost = 3;
}
else if ( lqi > MIN_LQI_COST_5 )
{
cost = 5;
}
else if ( lqi == LINK_AGEOUT_COST )
{
cost = LINK_AGEOUT_COST;
}
return cost;
}
In the topic https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1094338/cc2652p-lqi-to-link-cost-mapping said that the mapping was outdated and it would be updated in newer SDK. When will it be done?
