mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
Add support for SH1106 controller
The SH1106 is almost indistinguisable from a SSD1306. - the nr of columns in the sh1106 is 132 vs 128 - use the proper includes/library functions when in use
This commit is contained in:
@@ -3,7 +3,12 @@
|
||||
#include <cstring>
|
||||
|
||||
#include <OLEDDisplayUi.h>
|
||||
|
||||
#ifdef USE_SH1106
|
||||
#include <SH1106Wire.h>
|
||||
#else
|
||||
#include <SSD1306Wire.h>
|
||||
#endif
|
||||
|
||||
#include "PeriodicTask.h"
|
||||
#include "TypedQueue.h"
|
||||
@@ -211,7 +216,11 @@ class Screen : public PeriodicTask
|
||||
/// Holds state for debug information
|
||||
DebugInfo debugInfo;
|
||||
/// Display device
|
||||
#ifdef USE_SH1106
|
||||
SH1106Wire dispdev;
|
||||
#else
|
||||
SSD1306Wire dispdev;
|
||||
#endif
|
||||
/// UI helper for rendering to frames and switching between them
|
||||
OLEDDisplayUi ui;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user