GlowBit.py
Public Member Functions | Public Attributes | List of all members
glowbit.stick.graph1D Class Reference

One dimensional graph ofject for drawing a graph bar on a GlowBit Stick display. More...

Inheritance diagram for glowbit.stick.graph1D:
Inheritance graph
[legend]
Collaboration diagram for glowbit.stick.graph1D:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, minIndex=0, maxIndex=7, minValue=0, maxValue=255, colour=0xFFFFFF, colourMap="Solid", update=False)
 Initialisation routine for the glowbit.stick.graph1D object. More...
 
- Public Member Functions inherited from glowbit.colourFunctions
def wheel (self, pos)
 Converts an integer "colour wheel position" to a packed 32-bit RGB GlowBit colour value. More...
 
def rgbColour (self, r, g, b)
 Converts the r, g, and b integer arguments to a packed 32-bit RGB GlowBit colour value. More...
 
def glowbitColour2RGB (self, colour)
 Converts a 32-bit GlowBit colour value to an (R,G,B) tuple. More...
 
def red (self)
 Returns the GlowBit colour value for pure red.
 
def green (self)
 Returns the GlowBit colour value for pure green.
 
def blue (self)
 Returns the GlowBit colour value for pure blue.
 
def yellow (self)
 Returns the GlowBit colour value for yellow.
 
def purple (self)
 Returns the GlowBit colour value for purple.
 
def cyan (self)
 Returns the GlowBit colour value for cyan.
 
def white (self)
 Returns the GlowBit colour value for white.
 
def black (self)
 Returns the GlowBit colour value for black.
 
- Public Member Functions inherited from glowbit.colourMaps
def colourMapSolid (self, index, minIndex, maxIndex)
 Trivial colourmap method which always returns the colour in the parent object. More...
 
def colourMapRainbow (self, index, minIndex, maxIndex)
 Maps the pure hue colour wheel between minIndex and maxIndex. More...
 

Public Attributes

 minValue
 
 maxValue
 
 minIndex
 
 maxIndex
 
 m
 
 offset
 
 update
 
 colour
 
 colourMap
 

Detailed Description

One dimensional graph ofject for drawing a graph bar on a GlowBit Stick display.

Constructor & Destructor Documentation

◆ __init__()

def glowbit.stick.graph1D.__init__ (   self,
  minIndex = 0,
  maxIndex = 7,
  minValue = 0,
  maxValue = 255,
  colour = 0xFFFFFF,
  colourMap = "Solid",
  update = False 
)

Initialisation routine for the glowbit.stick.graph1D object.

This object is drawn to the display with glowbit.stick.updateGraph1D.

Parameters
minIndexThe pixel index for the start of the graph
maxIndexThe pixel index for the end of the graph
minValueThe numerical value of the start of the graph
maxValueThe numerical value of the end of the graph
colourThe graph's colour if using the Solid colourmap
colourMapEither the string "Solid" or "Rainbow" or a function pointer to a custom colour map. Custom colour maps must take the parameters colourMap(Self, index, minIndex, maxIndex).
updateIf this is set to True then a call to updateGraph1D() will automatically call pixelsShow() to update the physical display.

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