Allows for a 90 frame animated gauge to be display on the uLCD
Diff: uLCD_gauges.cpp
- Revision:
- 4:069b01d563a3
- Parent:
- 3:eee40e4de1c4
--- a/uLCD_gauges.cpp Fri Mar 13 15:25:56 2015 +0000 +++ b/uLCD_gauges.cpp Fri Mar 13 15:29:02 2015 +0000 @@ -8,14 +8,6 @@ * @date 3/13/2015 */ -/** -* Constructor for the uLCD_gauges class. Sets up the value mapping assuming the default gauge is used. -* @author Matthew Arceri -* @param screen The uLCD instance that is going to be used for the gauge -* @param min The minimum value the gauge wil be updated with. Used for mapping. -* @param max The maximum value the gauge wil be updated with. Used for mapping. -* @date 3/13/2015 -*/ uLCD_gauges::uLCD_gauges(uLCD_4DGL& screen, float min, float max){ uLCD = &screen; minVal = min; @@ -26,16 +18,7 @@ memHigh = 0; memLow = 0; } -/** -* Constructor for the uLCD_gauges class. Sets up the value mapping for custom gauges. -* @author Matthew Arceri -* @param screen The uLCD instance that is going to be used for the gauge -* @param min The minimum value the gauge wil be updated with. Used for mapping. -* @param max The maximum value the gauge wil be updated with. Used for mapping. -* @param memoryAddressHigh The ending memory address of the animation that will be displayed as a gauge. -* @param memoryAddressLow The starting memory address of the animation that will be displayed as a gauge. -* @date 3/13/2015 -*/ + uLCD_gauges::uLCD_gauges(uLCD_4DGL& screen, float min, float max, int lowF, int highF, long memoryAddressHigh, long memoryAddressLow){ uLCD = &screen; minVal = min; @@ -47,11 +30,6 @@ memLow = memoryAddressLow; } -/** -* This method repares the uLCD for displaying the gauge. Must be called once after object instancing -* @author Matthew Arceri -* @date 3/13/15 -*/ void uLCD_gauges::start() { uLCD->baudrate(3000000); uLCD->cls(); @@ -59,12 +37,6 @@ uLCD->set_sector_address(0,0); } -/** -* This method updates the gauge based on the new input value -* @author Harsha Nori -* @param value The value to be mapped onto the display -* @date 3/13/15 -*/ void uLCD_gauges::update(float value){ //Map value in range minVal to maxVal onto 1 to 99 int mappedValue = int(mapOffset + mapSlope*(value - minVal));