智能车OLED关于动态显示数字

void Display(int16 i,uint8 x,uint8 y)
{
      int8 a[6]={0}; 
      if(i<0)
      {
        a[0]='-';
      i=-i;
      }
      else
        a[0]='+';
      a[1]=i/10000;
      a[2]=i%10000/1000;
      a[3]=i%1000/100;
      a[4]=i%100/10;
      a[5]=i%10;
      for(uint8 j=0;j<6;j++)
      {
         switch(a[j])
         {
           case 0:{LCD_Print(x,y,"0");}break;
           case 1:{LCD_Print(x,y,"1");}break;
           case 2:{LCD_Print(x,y,"2");}break;
           case 3:{LCD_Print(x,y,"3");}break;
           case 4:{LCD_Print(x,y,"4");}break;
           case 5:{LCD_Print(x,y,"5");}break;
           case 6:{LCD_Print(x,y,"6");}break;
           case 7:{LCD_Print(x,y,"7");}break;
           case 8:{LCD_Print(x,y,"8");}break;
           case 9:{LCD_Print(x,y,"9");}break; 
         case '-':{LCD_Print(x,y,"-");}break;
         case '+':{LCD_Print(x,y,"+");}break;
           default:break;
          }
         x+=10;
         if(x==80)
           x=20;
         }
}

想问一下最后这里
if(x==80)
x=20;
有什么作用

你可能感兴趣的:(智能车OLED关于动态显示数字)