牛RF 或牛 驱动大哥 进来解读下 小弟感激
时间:10-02
整理:3721RD
点击:
static U8 srv_nw_info_rx_level_to_percentage(U8 rx_level)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 percentage;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
percentage = 0;
if (rx_level <= 3)
{
percentage = 0; \\level * 2 - 110 - 3 = dbm\ }
else if (rx_level < 10)
{
percentage = 20 * (rx_level - 3) / 3;
}
else if (rx_level < 14)
{
percentage = 65;
}
else if (rx_level < 18)
{
percentage = 85;
}
else if (rx_level < 18)
{
/*
* >= 6 -> 20% : 1 grids
* >= 9 -> 40% : 2 grids
* >= 12 -> 60% : 3 grids
* >= 15 -> 80% : 4 grids
*/
percentage = 20 * (rx_level - 3) / 3;
}
else
{
percentage = 100;
}
return percentage;
}
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 percentage;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
percentage = 0;
if (rx_level <= 3)
{
percentage = 0; \\level * 2 - 110 - 3 = dbm\ }
else if (rx_level < 10)
{
percentage = 20 * (rx_level - 3) / 3;
}
else if (rx_level < 14)
{
percentage = 65;
}
else if (rx_level < 18)
{
percentage = 85;
}
else if (rx_level < 18)
{
/*
* >= 6 -> 20% : 1 grids
* >= 9 -> 40% : 2 grids
* >= 12 -> 60% : 3 grids
* >= 15 -> 80% : 4 grids
*/
percentage = 20 * (rx_level - 3) / 3;
}
else
{
percentage = 100;
}
return percentage;
}
大哥你说的真对 碰到个“好客户”一直揪着这个信号格不放
根据接收电平调整信号显示格,四格显示的话,信号格会跳动比较厉害,给人造成手机信号差的印象哦.
理解很浅