找回密码
 注册
搜索
查看: 981|回复: 2

[讨论] 牛RF 或牛 驱动大哥 进来解读下 小弟感激

[复制链接]
发表于 2011-7-13 16:03:02 | 显示全部楼层 |阅读模式
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;
}
 楼主| 发表于 2011-7-14 16:27:09 | 显示全部楼层
大哥你说的真对  碰到个“好客户”一直揪着这个信号格不放
点评回复

使用道具 举报

发表于 2011-7-14 08:36:37 | 显示全部楼层
根据接收电平调整信号显示格,四格显示的话,信号格会跳动比较厉害,给人造成手机信号差的印象哦.

理解很浅[em07]
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-6-26 09:34 , Processed in 0.047237 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表