sadika9 / TFTLCD-SPFD5408

2 stars 2 forks source link

Doesn't compile #4

Open orzel opened 3 years ago

orzel commented 3 years ago

I have several errors (see end of post). The first and most obvious one is that read8inline is defined twice, and indeed, that can still be seen in github as of today: https://github.com/sadika9/TFTLCD-SPFD5408/blob/3980b7b17d0a8a822548dbcf7d09a92f2921d2f8/src/pin_magic.h#L174

The second definition is following the first, so that really look like a copy/paste problem. Other errors follow and prevent compilation. As i note that the code hasnn't been touched for 3 years and that pull request have been ignored for as long... Is this code still maintained ? If not, could you make it explicit either by a warning or by removing the repository ?

(it seems that one of the pull requests solves those errors)

compilation output: /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/pin_magic.h:179: warning: "read8inline" redefined 179 #define read8inline(result) { \
/home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/pin_magic.h:174: note: this is the location of the previous definition 174 #define read8inline(result) { \
/home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/pin_magic.h:297:33: warning: backslash and newline separated by space 297 #define read8inline(result) { \
/home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/TftSpfd5408.cpp:803: warning: "read8" redefined 803 #define read8(x) x=read8fn()
In file included from /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/TftSpfd5408.cpp:19: /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/pin_magic.h:198: note: this is the location of the previous definition 198 #define read8 read8inline

/home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/TftSpfd5408.cpp: In member function ‘void TftSpfd5408::init()’: /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/TftSpfd5408.cpp:115:3: error: ‘textsize’ was not declared in this scope; did you mean ‘textsize_x’? 115 | textsize = 1; | ^~~~ | textsize_x In file included from /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/TftSpfd5408.cpp:19: /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/TftSpfd5408.cpp: In member function ‘void TftSpfd5408::begin(uint16_t)’: /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/TftSpfd5408.cpp:283:43: warning: unsigned conversion from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} changes value from ‘11051’ to ‘43’ [-Woverflow] 283 | writeRegister16(ILI9341_VCOMCONTROL1, 0x2B2B); /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/pin_magic.h:416:24: note: in definition of macro ‘writeRegister16inline’ 416 | hi = (d) >> 8; lo = (d); CD_DATA ; write8(hi); write8(lo); } | ^ /home/orzel/Arduino/libraries/SPFD5408_TFT_Library/src/TftSpfd5408.cpp:283:5: note: in expansion of macro ‘writeRegister16’ 283 | writeRegister16(ILI9341_VCOMCONTROL1, 0x2B2B); | ^~~~~~~

sadika9 commented 3 years ago

@orzel Sorry for delay. I do not have access to this screen anymore therefore I'm unable to maintain this. Anyway I have merged all pending PRs

sadika9 commented 3 years ago

Let me know if this fix the issue. so I can make a release

grafmar commented 3 years ago

I just added a pull request with the needed change. I tested it on my hardware with Arduino Uno and TFT-shield.

Hopefully this issue can be closed ;-)