Used to draw horizontal bar indicators using characters on a Gameduino display. Requires Gameduino library.

This is used to display moving bar style indicators on a Gameduino VGA display. You will require the Gameduino library in order to use this. The indicators are made up of a horizontal strip of characters. The left side of the indicator represents the minimum possible reading and the right side represents the maximum possible reading. When you draw the indicator you specify what reading to display and the code works out which characters to display so that a bar is drawn starting at the left and extending right up to an appropriate position. The BarIndicator class allows you to specify the location of the indicator on the screen, the length of the indicator (the number of characters to use) and the minimum and maximum values for the bar. You can also change which section of the character set to use when drawing the bar.

Revision:
1:2d2a358a8f7d
Parent:
0:d4ba843a0e6a
Child:
2:0ca3285971c6
--- a/BarIndicator.h	Sun Nov 11 13:01:20 2012 +0000
+++ b/BarIndicator.h	Sun Nov 11 13:07:28 2012 +0000
@@ -30,7 +30,7 @@
      * There should be 10 characters defined starting at this code, in this order:
      * 0 : Empty
      * 1 : 1/8 full
-     * 2 : 1/0 full
+     * 2 : 1/4 full
      * 3 : 3/8 full
      * 4 : 1/2 full
      * 5 : 5/8 full
@@ -38,7 +38,7 @@
      * 7 : 7/8 full
      * 8 : Full
      * 9 : Greyed out (used when reading is invalid).
-     * @params code Character code at which thermometer characters start.
+     * @params sc Character code at which thermometer characters start.
      */
     void SetStartCode( UInt8 sc ) {
       startCode = sc;