if (WheelOld==0x01 && WheelNow==0x02) // 是左旋转否
{
switch(tmpstate)
{
case 0x0100:
wheelold_data[0]=WheelNow;
break;
case 0x0804:
wheelold_data[1]=WheelNow;
break;
case 0x0A09:
wheelold_data[2]=WheelNow;
break;
case 0x0F0E:
wheelold_data[3]=WheelNow;
break;
case 0x1110:
wheelold_data[4]=WheelNow;
break;
case 0x1312:
wheelold_data[5]=WheelNow;
break;
case 0x1514:
wheelold_data[6]=WheelNow;
break;
case 0x1716:
wheelold_data[7]=WheelNow;
break;
default: break;
}
// WheelOld=WheelNow;
// return(WheelLeft()); //左旋转
return(knob_coding[c]); //左旋转
}
else if (WheelOld==0x02 && WheelNow==0x01) // 是右旋转否
{
switch(tmpstate)
{
case 0x0100:
wheelold_data[0]=WheelNow;
break;
case 0x0804:
wheelold_data[1]=WheelNow;
break;
case 0x0A09:
wheelold_data[2]=WheelNow;
break;
case 0x0F0E:
wheelold_data[3]=WheelNow;
break;
case 0x1110:
wheelold_data[4]=WheelNow;
break;
case 0x1312:
wheelold_data[5]=WheelNow;
break;
case 0x1514:
wheelold_data[6]=WheelNow;
break;
case 0x1716:
wheelold_data[7]=WheelNow;
break;
default: break;
}
// WheelOld=WheelNow;
// return(WheelRight()); //右旋转
return(knob_coding[c+1]); //左旋转
}
switch(tmpstate)
{
case 0x0100:
wheelold_data[0]=WheelNow;
break;
case 0x0804:
wheelold_data[1]=WheelNow;
break;
case 0x0A09:
wheelold_data[2]=WheelNow;
break;
case 0x0F0E:
wheelold_data[3]=WheelNow;
break;
case 0x1110:
wheelold_data[4]=WheelNow;
break;
case 0x1312:
wheelold_data[5]=WheelNow;
break;
case 0x1514:
wheelold_data[6]=WheelNow;
break;
case 0x1716:
wheelold_data[7]=WheelNow;
break;
default: break;