🪄 Formats display service

This commit is contained in:
Rune Harlyk
2024-07-09 20:06:33 +02:00
committed by Rune Harlyk
parent 42eafde631
commit 181788ee46
+2 -4
View File
@@ -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;