匠人哥请问一下你的9、消抖滤波法 while (value !=new_value);后面是有分号吗,我怎么感觉应该是没有分号的啊,请解答
#define N 12
char filter()
{
char count=0;
char new_value;
new_value = get_ad();
while (value !=new_value);
{
count++;
if (count>=N) return new_value;
delay();
new_value = get_ad();
}
return value;
} |
|