标题:这段程序 bCurrent_Duty++后还要判断上一个if吗
取消只看楼主
liangyutan
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-6-4
结帖率:0
已结贴  问题点数:20 回复次数:0 
这段程序 bCurrent_Duty++后还要判断上一个if吗
if(bSpeed_Count >= SPEED_LOOP_RATE)  // Is it Duty update?,
            {
                bSpeed_Count = 0;  //clear count
                if(bCurrent_Duty < _bTarget_Duty)  //
                {
                    // If current duty less than target, current duty + 1
                    if(bCurrent_Duty < MAX_SPEED)//
                        bCurrent_Duty++;
                }                                 
                else  // If current duty more than target, current duty - 1     
                    if(bCurrent_Duty > _bTarget_Duty)       //
                    {
                        if(bCurrent_Duty > MIN_SPEED)
                            bCurrent_Duty--;
                    }
这个 bCurrent_Duty++后还要判断上一个if吗
搜索更多相关主题的帖子: count update current target 
2013-06-04 14:36



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-414489-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.373156 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved