0

RA8875, HUZZAH-ESP8266, textEnlarge(2/3) = NG
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RA8875, HUZZAH-ESP8266, textEnlarge(2/3) = NG

by Cragjock on Mon Nov 13, 2017 11:16 pm

Hello,

I purchased the RA8875 board (PN 1590), HUZZAH ESP8266 with WiFi (PN 3046) and 7" TFT display (800x480) with touchscreen (PN 2354). I am using Arduino IDE 1.8.3. All works ok with my code and most of the example code except the example "textmode". Well, it works, but tft.textEnlarge(2) (or 3) cause the text to display on itself. It seems the cursor does not advance as expected. If I change the string to write to be "1" or any single character, it displays correctly in size and position. I tweaked some of the if/else if conditions and delays in the source file in the textEnlarge function and the textWrite function, but no change. I am using the current source from github and checked some of the other posts, but, still, I cannot find the issue.

So, help!!!!

Thanks,
Steve

P.S. Adafruit is AWESOME!

Cragjock
 
Posts: 3
Joined: Mon Nov 13, 2017 11:00 pm

Re: RA8875, HUZZAH-ESP8266, textEnlarge(2/3) = NG

by Cragjock on Tue Nov 14, 2017 12:35 am

Hello again,

So, the ESP8266 is not an Atmega or AVR processor, right? I know, it is not. So, line 415-ish in the file Adafruit_RA8775,cpp: "#if defined(__AVR__) if (_textScale > 1) delay(1);" will have no effect as __AVR__ is not defined.

I moved the line "if (_textScale > 1) delay(1);" in the normal flow, all works ok now.
BTW, the delay(1) is needed.

So, what is the correct macro to use? #if defined(__ESPxxx__) or what? Have not found that yet.

Thanks,
Steve

Cragjock
 
Posts: 3
Joined: Mon Nov 13, 2017 11:00 pm

Re: RA8875, HUZZAH-ESP8266, textEnlarge(2/3) = NG

by Cragjock on Tue Nov 14, 2017 11:01 pm

Hello all,

I am SOOOOO blind! Found it in the file Adafruit_GFX.h as ESP8266 or ESP32. For my program, it is the ESP8266 that is defined.
I modified my local version of Adafruit_RA8875.cpp by changing line 415 from #if defined(__AVR__) to #if defined(__AVR__) || defined (ESP8266) .

All seems ok.

Thanks!

Cragjock
 
Posts: 3
Joined: Mon Nov 13, 2017 11:00 pm

Please be positive and constructive with your questions and comments.