   
   u8g.drawHLine(5, 60, 120);
   u8g.drawLine(5, 60, 5, 35);
-  mappedVinMax=map(VinMax,0,maxControllerVoltage, 0, 25);
-  u8g.drawHLine(5, 60 - mappedVinMax, 120);
-  u8g.setColorIndex(0);
-  for (i = 5 ; i < 124; i = i +2)
-  {
-    u8g.drawPixel(i , 60 - mappedVinMax );
-  }
-  u8g.setColorIndex(255);
+  
+  drawBatteryLimit();
+  curveDisplay(); 
   }while(u8g.nextPage());
+  if (curveCpt < 120)
+  {
+    curveCpt++;
+  }
+  else
+  {
+    curveCpt = 0;
+  }
   delay(500);
 }
 

  
}

void displayLCD(char selection)                   // Diplays the informations on the LCD
{ 
  char percent;
  char i;
  float mappedVinMax;
  float mappedval;
  
  u8g.firstPage();


void drawCurve(byte numberArray)
{ 
  u8g.setColorIndex(1);
  u8g.drawPixel(5 + numberArray, 60 - curveTab[numberArray]);  
  u8g.setColorIndex(255);  
}

void drawBatteryLimit(void)
{ 
  char i;
  float mappedVinMax;
  mappedVinMax=map(VinMax,0,maxControllerVoltage, 0, 25);
  u8g.drawHLine(5, 60 - mappedVinMax, 120);
  u8g.setColorIndex(0);
  for (i = 5 ; i < 124; i = i +2)
  {
    u8g.drawPixel(i , 60 - mappedVinMax );
  }
  u8g.setColorIndex(255);
}

