🪄 Formats display service
This commit is contained in:
@@ -8,13 +8,11 @@
|
|||||||
#define SCREEN_WIDTH 128
|
#define SCREEN_WIDTH 128
|
||||||
#define SCREEN_HEIGHT 64
|
#define SCREEN_HEIGHT 64
|
||||||
|
|
||||||
class DisplayService
|
class DisplayService {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
DisplayService() : display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1) {};
|
DisplayService() : display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1) {};
|
||||||
|
|
||||||
bool begin()
|
bool begin() {
|
||||||
{
|
|
||||||
std::lock_guard<std::mutex> guard(displayMutex);
|
std::lock_guard<std::mutex> guard(displayMutex);
|
||||||
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
|
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user