Allows for a 90 frame animated gauge to be display on the uLCD

Dependents:   uLCDgaugeTest

Committer:
Striker121
Date:
Fri Mar 13 15:47:13 2015 +0000
Revision:
8:4a69fe1bc451
Parent:
7:761059a69344
final dox update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Striker121 5:df405a69bb31 1 #ifndef ULCD_GAUGES_H
Striker121 5:df405a69bb31 2 #define ULCD_GAUGES_H
Striker121 5:df405a69bb31 3
Striker121 5:df405a69bb31 4 #include "uLCD_4DGL.h"
Striker121 5:df405a69bb31 5 #include "mbed.h"
Striker121 5:df405a69bb31 6
Striker121 8:4a69fe1bc451 7 /**
Striker121 8:4a69fe1bc451 8 * Header file for uLCD gauges library
Striker121 2:38006c26dda5 9 */
Striker121 0:9101c0ce36a1 10 class uLCD_gauges {
Striker121 0:9101c0ce36a1 11 public:
Striker121 4:069b01d563a3 12 /**
Striker121 4:069b01d563a3 13 * Constructor for the uLCD_gauges class. Sets up the value mapping assuming the default gauge is used.
Striker121 4:069b01d563a3 14 * @param screen The uLCD instance that is going to be used for the gauge
Striker121 4:069b01d563a3 15 * @param min The minimum value the gauge wil be updated with. Used for mapping.
Striker121 4:069b01d563a3 16 * @param max The maximum value the gauge wil be updated with. Used for mapping.
Striker121 4:069b01d563a3 17 */
Striker121 0:9101c0ce36a1 18 uLCD_gauges(uLCD_4DGL& screen, float min, float max);
Striker121 4:069b01d563a3 19 /**
Striker121 4:069b01d563a3 20 * Constructor for the uLCD_gauges class. Sets up the value mapping for custom gauges.
Striker121 4:069b01d563a3 21 * @param screen The uLCD instance that is going to be used for the gauge
Striker121 4:069b01d563a3 22 * @param min The minimum value the gauge wil be updated with. Used for mapping.
Striker121 4:069b01d563a3 23 * @param max The maximum value the gauge wil be updated with. Used for mapping.
Striker121 4:069b01d563a3 24 * @param memoryAddressHigh The ending memory address of the animation that will be displayed as a gauge.
Striker121 4:069b01d563a3 25 * @param memoryAddressLow The starting memory address of the animation that will be displayed as a gauge.
Striker121 4:069b01d563a3 26 */
Striker121 2:38006c26dda5 27 uLCD_gauges(uLCD_4DGL& screen, float min, float max, int lowF, int highF, long memoryAddressHigh, long memoryAddressLow);
Striker121 4:069b01d563a3 28 /**
Striker121 4:069b01d563a3 29 * This method repares the uLCD for displaying the gauge. Must be called once after object instancing
Striker121 4:069b01d563a3 30 */
Striker121 0:9101c0ce36a1 31 void start();
Striker121 4:069b01d563a3 32 /**
Striker121 4:069b01d563a3 33 * This method updates the gauge based on the new input value
Striker121 4:069b01d563a3 34 * @param value The value to be mapped onto the display
Striker121 4:069b01d563a3 35 */
Striker121 0:9101c0ce36a1 36 void update(float value);
Striker121 0:9101c0ce36a1 37
Striker121 0:9101c0ce36a1 38 private:
Striker121 0:9101c0ce36a1 39 uLCD_4DGL *uLCD;
Striker121 0:9101c0ce36a1 40 float minVal;
Striker121 0:9101c0ce36a1 41 float maxVal;
Striker121 0:9101c0ce36a1 42 float mapOffset;
Striker121 0:9101c0ce36a1 43 float mapSlope;
Striker121 2:38006c26dda5 44 float highFrame;
Striker121 1:5666427710f2 45 long memHigh;
Striker121 1:5666427710f2 46 long memLow;
Striker121 0:9101c0ce36a1 47 };
Striker121 0:9101c0ce36a1 48
Striker121 0:9101c0ce36a1 49 #endif