       switch (event)
       {
         case vfo_RLeft:
-          if (++index > 16)
-            index = 16;
+          if (++index > 15)
+            index = 15;
           break;
         case vfo_RRight:
-          if (--index < 1)
-            index = 1;
+          if (--index < 0)
+            index = 0;
           break;
         case vfo_Click:
           old_contrast = LcdContrast;  // for when we exit

      }

      // adjust display contrast so we can see the results
      LcdContrast = index * 8;
      analogWrite(mc_Contrast, LcdContrast);

      // show brightness value in row 1
      // Contrast voltage works opposite to brightness
      draw_row1_bar(17 - index);
    }
  }
}

  // save old contrast just in case we don't set it here
  int old_contrast = LcdContrast;
  
  // convert contrast value to a display value in [0, 15]
  int index = LcdContrast / 3;

  if (index > 15)   // ensure in range
    index = 15;
  if (index < 0)
    index = 0;
 
  // get rid of any stray events to this point
  event_flush();
