 }
 
 TS_Point getFixedCoordinates(void){
-   TS_Point p = ts.getPoint();
+   p = ts.getPoint();
+   while(!ts.bufferEmpty()){
+       TS_Point throwaway = ts.getPoint(); 
+   }
    // Scale from 0-4000 to tft.width() using calibration numbers
    p.x = tft.height() - map(p.x, TS_MINX, TS_MAXX, 0, tft.height());
    p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.width());


void ECGSettings_setup(void){
  /* MINIMUM VALUE */
  if (DEFAULT_ECG_MIN + biasECGMin < 100){
    tft.setCursor(63, 72);
    tft.setTextSize(2);

    }
  }
  /*alarm screen*/
  if (currentMode == ALARMSCREEN){
    SettingsScreenInit();
    while(currentMode == ALARMSCREEN){
      p = getFixedCoordinates();
      if(ECGPlus.isTapped(p.x,p.y)){
        biasECGMin += 1;
        /*for two digit numbers*/
        if (DEFAULT_ECG_MIN + biasECGMin < 100){
          tft.fillRect(56, 72, 45, 20, ILI9341_BLACK);
          tft.setCursor(63, 72);
          tft.setTextSize(2);
          tft.setTextColor(ILI9341_GREEN);
          tft.printf("%d", DEFAULT_ECG_MIN + biasECGMin);
            if (ts.bufferEmpty()){
        p.x = 0;
        p.y = 0;
      }
        }
        else if (DEFAULT_ECG_MIN + biasECGMin > 99){
          /*for three digit numbers*/
          tft.fillRect(56, 72, 45, 20, ILI9341_BLACK);
          tft.setCursor(56, 72);
          tft.setTextSize(2);
          tft.setTextColor(ILI9341_GREEN);
          tft.printf("%d", DEFAULT_ECG_MIN + biasECGMin);
            if (ts.bufferEmpty()){
        p.x = 0;
        p.y = 0;
      }
        }
      }
    
      /*if(ECGMinus.isTapped(p.x,p.y)){
      biasECGMin -= 1;
      //for two digit numbers
        if (DEFAULT_ECG_MIN + biasECGMin < 100){
          tft.setCursor(63, 72);
          tft.setTextSize(2);
          tft.setTextColor(ILI9341_GREEN);
          
          tft.printf("%d", DEFAULT_ECG_MIN + biasECGMin);
        }
        if (DEFAULT_ECG_MIN + biasECGMin > 99){
          //for three digit numbers
          tft.setCursor(56, 72);
          tft.setTextSize(2);
          tft.setTextColor(ILI9341_GREEN);
          tft.printf("%d", DEFAULT_ECG_MIN + biasECGMin);
        }
      }*/
      
      /*before the isr was implemented*/
      //TS_Point p = ts.getPoint();
      // Scale from 0-4000 to tft.width() using calibration numbers
      //p.x = tft.height() - map(p.x, TS_MINX, TS_MAXX, 0, tft.height());
