mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-06 09:58:23 +02:00
- rework "hiding Pins" to easier configure pins for new displays (using a pin map, remove hard-coded if-statements)
- rework display type handling: remove uneeded checks because defined context from which functions are called - default initialize "mMono" pointer (potential illegal memory access) - define EXACTLY one display type for ePaper display (type 10). There is no need to use ranges and distinguish oled from epaper display. Simply one switch/case - correct type handling for display type (javascript). Event handler gives a string instead of number (display type)
This commit is contained in:
parent
47d5531d05
commit
c99851364a
3 changed files with 46 additions and 48 deletions
|
@ -26,7 +26,7 @@ DisplayEPaper::DisplayEPaper() {
|
|||
void DisplayEPaper::init(uint8_t type, uint8_t _CS, uint8_t _DC, uint8_t _RST, uint8_t _BUSY, uint8_t _SCK, uint8_t _MOSI, uint32_t *utcTs, const char *version) {
|
||||
mUtcTs = utcTs;
|
||||
|
||||
if (type > 9) {
|
||||
if (type == 10) {
|
||||
Serial.begin(115200);
|
||||
_display = new GxEPD2_BW<GxEPD2_150_BN, GxEPD2_150_BN::HEIGHT>(GxEPD2_150_BN(_CS, _DC, _RST, _BUSY));
|
||||
hspi.begin(_SCK, _BUSY, _MOSI, _CS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue