Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otPlot Class Reference
[PLOT - Graphics library for data plot, PLOT - Graphics library for data plot]

Class for data plot.

#include <otPlot.h>


Public Member Functions

 otPlot ()
bool init (S16 xpos, S16 ypos, S16 xdim, S16 ydim, otGraphics *lcdInt)
void close ()
void setRange (F32 min, F32 max)
void plot (bool clear=true)
void plot (U16 col)
void setData (F32 *data)
void setData (S16 *data)
void setData (U32 *data, bool save=false)
void autorange ()
void clear (F32 val=0.0f)
void addData (F32 data)
void setGridStep (U8 step)
void update ()
void grid ()


Constructor & Destructor Documentation

otPlot.otPlot (   ) 
 

Create the class


Member Function Documentation

void otPlot.addData (  F32  data  ) 
 

Add a point to the data buffer, previous values are shifted to the right.

Parameters:
data New data value to add

void otPlot.autorange (   ) 
 

Find a new min/max of the internal buffer

void otPlot.clear (  F32  val = 0.0f  ) 
 

Clear, or set a specified value, the internal buffer.

Parameters:
val Value used for buffer clear, default 0

void otPlot.close (   ) 
 

Close all allocated memory

void otPlot.grid (   ) 
 

Plot the grid.

bool otPlot.init (  S16  xpos,
S16  ypos,
S16  xdim,
S16  ydim,
otGraphics *  lcdInt
) 
 

Init the class

Parameters:
xpos Horizontal start position on display.
ypos Vertical start position on display.
xdim Plot width and number of samples to plot
ydim Plot height
lcdInt LCD driver
Returns:
True on success

void otPlot.plot (  U16  col  ) 
 

Plot with selected color the print buffer, no other operations is allowed.

Parameters:
col 565 coded color

void otPlot.plot (  bool  clear = true  ) 
 

Plot data on LCD. It is a high-level operation that (optional) deletes the previous plot, updates the print buffer, plot the grid and executes the data plot.

Parameters:
clear If true clear previous plot

void otPlot.setData (  U32 *  data,
bool  save = false
) 
 

Set new data in the buffer

Parameters:
data Pointer to data buffer.
save If true save secondary buffer

void otPlot.setData (  S16 *  data  ) 
 

Set new data in the buffer

Parameters:
data Pointer to data buffer.

void otPlot.setData (  F32 *  data  ) 
 

Set new data in the buffer

Parameters:
data Pointer to data buffer.

void otPlot.setGridStep (  U8  step  ) 
 

Set grid spacing

Parameters:
step Grid space

void otPlot.setRange (  F32  min,
F32  max
) 
 

Set the plot range

Parameters:
min Minimum value
max Maximum value

void otPlot.update (   ) 
 

Buffer merge.


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-25 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0