sumotoy / TFT_ST7735

A fast driver for ST7735 displays that works with Arduino's /All Teensy's/ESP8266/SPARK
68 stars 31 forks source link

Library collides with keypad.h (keypad.cpp) IDLE in Variable pls change #30

Open Meins321 opened 4 years ago

Meins321 commented 4 years ago

@sumotoy Hello everyone,

i do use this library together with a keypad (4x4 Foil) and it throws compile errors in arduino ide because of the use of "IDLE" variable which is already used by lots of other librarys. maybe we can change IDLE to IDLE_TFT in ?

The standard Arduion Keypad IDE suggests to use the Keypad v3.1.1 by Mark Stanley, Alexander Brevig found here: https://github.com/Chris--A/Keypad and https://playground.arduino.cc/Code/Keypad/ together with our library here throws errors

DebugOut ```C# libraries\Keypad\src/Key.h:41:15: error: redeclaration of 'IDLE' typedef enum{ IDLE, PRESSED, HOLD, RELEASED } KeyState libraries\TFT_ST7735-1.0p1/TFT_ST7735.h:104:38: note: previous declaration 'ST7735_modes IDLE' enum ST7735_modes { NORMAL=0,PARTIAL,IDLE,SLEEP,INVERT,DISP_ON,DISP_OFF };//0,1,2,3,4,5,6 ```

Change:

enum ST7735_modes { NORMAL=0,PARTIAL,**IDLE**,SLEEP,INVERT,DISP_ON,DISP_OFF };//0,1,2,3,4,5,6 to
enum ST7735_modes { NORMAL=0,PARTIAL,**IDLE_TFT**,SLEEP,INVERT,DISP_ON,DISP_OFF };//0,1,2,3,4,5,6

Any help very appreciated

For the time now anyone can change in the keyboard lib IDLE to IDLE_KEY: Keypad_IDLE_Change

Meins321 commented 2 years ago

@sumotoy