Parola for Arduino  2.0
Text effects for Parola modular hardware
 All Classes Files Functions Enumerations Enumerator Macros Pages
MD_PZone Class Reference

#include <MD_Parola.h>

Public Member Functions

 MD_PZone (void)
 
void begin (MD_MAX72XX *p)
 
 ~MD_PZone (void)
 
Methods for core object control.
bool zoneAnimate (void)
 
bool getStatus (void)
 
void zoneClear (void)
 
void zoneReset (void)
 
void zoneSuspend (bool b)
 
void setZone (uint8_t zStart, uint8_t zEnd)
 
Support methods for visually adjusting the display.
uint8_t getCharSpacing (void)
 
bool getInvert (void)
 
uint16_t getPause (void)
 
uint16_t getSpeed (void)
 
textPosition_t getTextAlignment (void)
 
void setCharSpacing (uint8_t cs)
 
void setIntensity (uint8_t intensity)
 
void setInvert (uint8_t invert)
 
void setPause (uint16_t pause)
 
void setSpeed (uint16_t speed)
 
void setTextAlignment (textPosition_t ta)
 
void setTextBuffer (char *pb)
 
void setTextEffect (textEffect_t effectIn, textEffect_t effectOut)
 
Support methods for fonts and characters.
bool addChar (uint8_t code, uint8_t *data)
 
bool delChar (uint8_t code)
 
void setZoneFont (MD_MAX72XX::fontType_t fontDef)
 

Detailed Description

Zone object for the Parola library. This class contains the text to be displayed and all the attributes for the zone.

Constructor & Destructor Documentation

MD_PZone::MD_PZone ( void  )

Class Constructor.

Instantiate a new instance of the class.

MD_PZone::~MD_PZone ( void  )

Class Destructor.

Release allocated memory and does the necessary to clean up once the object is no longer required.

Member Function Documentation

bool MD_PZone::addChar ( uint8_t  code,
uint8_t *  data 
)

Add a user defined character to the replacement list.

Add a replacement characters to the user defined list. The character data must be the same as for a single character in the font definition file. If a character is specified with a code the same as an existing character the existing data will be substituted for the new data. A character code of 0 is illegal as this denotes the end of string character for C++ and cannot be used in an actual string. The library does not copy the in the data in the data definition but only retains a pointer to the data, so any changes to the data storage in the calling program will be reflected in the library.

Parameters
codeASCII code for the character data.
datapointer to the character data.
Returns
true of the character was inserted in the substitution list.
void MD_PZone::begin ( MD_MAX72XX *  p)

Initialize the object.

Initialise the object data. This will becalled from the MD_Parola begin() to initialise new data for the class that cannot be done during the object creation.

Parameters
ppointer to the parent object for this zone.
bool MD_PZone::delChar ( uint8_t  code)

Delete a user defined character to the replacement list.

Delete a replacement character to the user defined list. A character code of 0 is illegal as this denotes the end of string character for C++ and cannot be used in an actual string.

Parameters
codeASCII code for the character data.
Returns
true of the character was found in the substitution list.
uint8_t MD_PZone::getCharSpacing ( void  )

Get the zone inter-character spacing in columns.

Returns
the current setting for the space between characters in columns.
bool MD_PZone::getInvert ( void  )

Get the zone current invert state.

See the setInvert() method.

Returns
the inverted boolean value.
uint16_t MD_PZone::getPause ( void  )

Get the zone pause time.

See the setPause() method.

Returns
the pause value in milliseconds.
uint16_t MD_PZone::getSpeed ( void  )

Get the zone animation speed.

See the setSpeed() method

Returns
the speed value.
bool MD_PZone::getStatus ( void  )

Get the completion status.

Return the current completion status for the zone animation.

See comments for the MD_Parola getZoneStatus() method.

Returns
bool true if the zone animation is completed
textPosition_t MD_PZone::getTextAlignment ( void  )

Get the current text alignment specification.

Returns
the current text alignment setting.
void MD_PZone::setCharSpacing ( uint8_t  cs)

Set the zone inter-character spacing in columns.

Set the number of blank columns between characters when they are displayed.

Parameters
csspace between characters in columns.
Returns
No return value.
void MD_PZone::setIntensity ( uint8_t  intensity)

Set the zone brightness.

Set the intensity (brightness) of the display.

Parameters
intensitythe intensity to set the display (0-15).
Returns
No return value.
void MD_PZone::setInvert ( uint8_t  invert)

Invert the zone display.

Set the display to inverted (ON LED turns OFF and vice versa).

Parameters
inverttrue for inverted display, false for normal display
Returns
No return value.
void MD_PZone::setPause ( uint16_t  pause)

Set the pause between ENTER and EXIT animations for this zone.

Between each entry and exit, the library will pause by the number of milliseconds specified to allow the viewer to read the message. For continuous scrolling displays this should be set to the same value as the display speed.

Parameters
pausethe time, in milliseconds, between animations.
Returns
No return value.
void MD_PZone::setSpeed ( uint16_t  speed)

Set the zone animation frame speed.

The speed of the display is the 'tick' time between animation frames. The lower this time the faster the animation; set it to zero to run as fast as possible.

Parameters
speedthe time, in milliseconds, between animation frames.
Returns
No return value.
void MD_PZone::setTextAlignment ( textPosition_t  ta)

Set the text alignment within the zone.

Text alignment is specified as one of the values in textPosition_t.

Parameters
tathe required text alignment.
Returns
No return value.
void MD_PZone::setTextBuffer ( char *  pb)

Set the pointer to the text buffer for this zone.

Sets the text buffer to be a pointer to user data. See the comments for the namesake method in MD_Parola.

Parameters
pbpointer to the text buffer to be used.
Returns
No return value.
void MD_PZone::setTextEffect ( textEffect_t  effectIn,
textEffect_t  effectOut 
)

Set the entry and exit text effects for the zone.

See the comments for the namesake method in MD_Parola.

Parameters
effectInthe entry effect, one of the textEffect_t enumerated values.
effectOutthe exit effect, one of the textEffect_t enumerated values.
Returns
No return value.
void MD_PZone::setZone ( uint8_t  zStart,
uint8_t  zEnd 
)

Set the start and end parameters for a zone.

See comments for the MD_Parola namesake method.

Parameters
zStartthe first module number for the zone [0..numZones-1].
zEndthe last module number for the zone [0..numZones-1].
void MD_PZone::setZoneFont ( MD_MAX72XX::fontType_t  fontDef)

Set the display font.

See comments for the namesake Parola method.

Parameters
fontDefPointer to the font definition to be used.
Returns
No return value.
bool MD_PZone::zoneAnimate ( void  )

Animate the zone.

Animate using the currently specified text and animation parameters. This method is invoked from the main Parola object.

Returns
bool true if the zone animation has completed, false otherwise.
void MD_PZone::zoneClear ( void  )

Clear the zone.

See comments for the MD_Parola namesake method.

Returns
No return value.
void MD_PZone::zoneReset ( void  )

Reset the current zone animation to restart.

See comments for the MD_Parola namesake method.

Returns
No return value.
void MD_PZone::zoneSuspend ( bool  b)

Suspend or resume zone updates.

See comments for the MD_Parola namesake method.

Parameters
bboolean value to suspend (true) or resume (false).
Returns
No return value.

The documentation for this class was generated from the following files: