RBCX
Library for the RB3204-RBCX board with the ESP32 by RoboticsBrno.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
rb::Oled Class Reference

Helper class for controlling the Oled. More...

#include <RBCXOled.h>

Public Types

enum  OledType { Oled_128x32 , Oled_128x64 }
 
enum  OledColor { Black = 0 , White = 1 }
 
enum  OledFontDef { Font_6x8 , Font_7x10 , Font_11x18 , Font_16x26 }
 
typedef enum rb::Oled::OledColor OledColor
 

Public Member Functions

void init (OledType type, bool rotate=true, bool inverseColor=false)
 
void fill (OledColor color=White)
 
void updateScreen (void)
 
void drawPixel (uint8_t x, uint8_t y, OledColor color=White)
 
void writeString (const char *str, OledFontDef Font, OledColor color=White)
 
void writeString (const std::string &str, OledFontDef Font, OledColor color=White)
 
void setCursor (uint8_t x, uint8_t y)
 
void drawLine (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, OledColor color)
 
void drawArc (uint8_t x, uint8_t y, uint8_t radius, uint16_t start_angle, uint16_t sweep, OledColor color)
 
void drawCircle (uint8_t x, uint8_t y, uint8_t radius, OledColor color)
 
void drawRectangle (uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, OledColor color)
 
uint8_t getWidth ()
 
uint8_t getHeight ()
 

Friends

class Manager
 

Detailed Description

Helper class for controlling the Oled.

Member Typedef Documentation

◆ OledColor

Member Enumeration Documentation

◆ OledColor

Enumerator
Black 
White 

◆ OledFontDef

Enumerator
Font_6x8 
Font_7x10 
Font_11x18 
Font_16x26 

◆ OledType

Enumerator
Oled_128x32 
Oled_128x64 

Member Function Documentation

◆ drawArc()

void rb::Oled::drawArc ( uint8_t  x,
uint8_t  y,
uint8_t  radius,
uint16_t  start_angle,
uint16_t  sweep,
OledColor  color 
)

◆ drawCircle()

void rb::Oled::drawCircle ( uint8_t  x,
uint8_t  y,
uint8_t  radius,
OledColor  color 
)

◆ drawLine()

void rb::Oled::drawLine ( uint8_t  x1,
uint8_t  y1,
uint8_t  x2,
uint8_t  y2,
OledColor  color 
)

◆ drawPixel()

void rb::Oled::drawPixel ( uint8_t  x,
uint8_t  y,
OledColor  color = White 
)

◆ drawRectangle()

void rb::Oled::drawRectangle ( uint8_t  x1,
uint8_t  y1,
uint8_t  x2,
uint8_t  y2,
OledColor  color 
)

◆ fill()

void rb::Oled::fill ( OledColor  color = White)

◆ getHeight()

uint8_t rb::Oled::getHeight ( )
inline

◆ getWidth()

uint8_t rb::Oled::getWidth ( )
inline

◆ init()

void rb::Oled::init ( OledType  type,
bool  rotate = true,
bool  inverseColor = false 
)

◆ setCursor()

void rb::Oled::setCursor ( uint8_t  x,
uint8_t  y 
)

◆ updateScreen()

void rb::Oled::updateScreen ( void  )

◆ writeString() [1/2]

void rb::Oled::writeString ( const char *  str,
OledFontDef  Font,
OledColor  color = White 
)

◆ writeString() [2/2]

void rb::Oled::writeString ( const std::string &  str,
OledFontDef  Font,
OledColor  color = White 
)
inline

Friends And Related Function Documentation

◆ Manager

friend class Manager
friend

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