Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
I'm sure it is my hork up re: tft.setFont()
#w8tee
Jack,
not really a programmer.. started to compile got through the MorseCode.h issue, it balks complaining? Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
?
I:\B40Software\B40SoftwareRel0106\B40SoftwareRel0106.ino: In function 'void ShowFrequency(long int, int)':
?
B40SoftwareRel0106:857: error: 'class MCUFRIEND_kbv' has no member named 'setFont'
?
? ?tft.setFont(); ? ? ? ? ?// Return to default size
?
? ? ? ?^
?
exit status 1
'class MCUFRIEND_kbv' has no member named 'setFont'
?
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I checked in MCUFRIEND_kbv-master\TFT_HX8347GLUE.h and at line 110 it exists.. could you give a hint? on where I am messing up? Vince |
Jack Purdum
That's not your fault. Starting with Rel 1.8 of the compiler, they tightened up the expression parser to catch more errors that before. Also, the mcufriend library inherits a lot of its functionality from the Adafruit libraries that the code uses. So you need to make sure that you have that library installed. #include <Adafruit_GFX.h> ? ? // https://github.com/adafruit/Adafruit-GFX-Library If you look in that library around line 85 you'll see the function prototype for setFont(). If you look at line 13 in the mcufriend header file, you'll see: class MCUFRIEND_kbv : public Adafruit_GFX { What this says is that the mcufriend library "inherits" the functionality of the Adafruit_GFX library, but adds some of its own stuff on top of that. So if you see an error that something is missing, it could be that you didn't install the Adaruit library. Jack, W8TEE ? From: Vince Loschiavo <vince320@...> To: [email protected] Sent: Friday, August 18, 2017 4:55 PM Subject: [BITX20] I'm sure it is my hork up re: tft.setFont() #w8tee Jack, not really a programmer.. started to compile got through the MorseCode.h issue, it balks complaining? Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
?
I:\B40Software\B40SoftwareRel0106\B40SoftwareRel0106.ino: In function 'void ShowFrequency(long int, int)':
?
B40SoftwareRel0106:857: error: 'class MCUFRIEND_kbv' has no member named 'setFont'
?
? ?tft.setFont(); ? ? ? ? ?// Return to default size
?
? ? ? ?^
?
exit status 1
'class MCUFRIEND_kbv' has no member named 'setFont'
?
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I checked in MCUFRIEND_kbv-master\TFT_HX8347GLUE.h and at line 110 it exists.. could you give a hint? on where I am messing up? Vince |
Jack,
Had the Adafruit - GFX-Library..just in case i downloaded and overwrot in the directory (i just keep those all as Zip, and add them. Your suggestion was to look for it in line 85..didnt find it there, in fact only in 2 places.. ? tft.setFont(); ? ? ? ? ?// Return to default size
? ? setFont(const GFXfont *f = NULL),
?
? then in:
I;\B40Software\libraries\Adafruit-GFX-Library-master\Adafruit-GFX-Library-master\Adafruit_GFX.h (1 hit) line 103; ? ?setFont(const GFXfont 8f = NULL) hmm. sorry for being the dumbnutz.. vince ? |
Jack Purdum
Hi Vince: You misunderstood what I was saying. If you look in the mcrufriend_kbv.h header file around line 13 you will see: class MCUFRIEND_kbv : public Adafruit_GFX { The colon (:) above can be verbalized as "I inherit all of the public variables and functionality in the Adafruit_GFX library." Then I said to look in the Adafruit_GFX.h file and around line 85 you find the function prototype for the setFont() function.? At line 251 in my code, I create a MCUFRIEND_kbv object from the mcuFriend library named tft: MCUFRIEND_kbv tft; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// Graph structure definition for TFT display However, since the mcuFriend_kbv library has full access to the Adafruit_GFX library via the inheritance chain, the tft object can access any public thingie in either library. That's one of the strengths of the Object Oriented Programming Trilogy: 1) Inheritance, 2) Encapsulation, and 3) Polymorphism. Simplifying all the crap above, it means I can us both libraries through a single object named tft. Jack, W8TEE From: Vince Loschiavo <vince320@...> To: [email protected] Sent: Sunday, August 20, 2017 5:11 PM Subject: Re: [BITX20] I'm sure it is my hork up re: tft.setFont() #w8tee Jack, Had the Adafruit - GFX-Library..just in case i downloaded and overwrot in the directory (i just keep those all as Zip, and add them. Your suggestion was to look for it in line 85..didnt find it there, in fact only in 2 places.. ? tft.setFont(); ? ? ? ? ?// Return to default size
? ? setFont(const GFXfont *f = NULL),
?
? then in:
I;\B40Software\libraries\Adafruit-GFX-Library-master\Adafruit-GFX-Library-master\Adafruit_GFX.h (1 hit) line 103; ? ?setFont(const GFXfont 8f = NULL) hmm. sorry for being the dumbnutz.. vince ?
|
to navigate to use esc to dismiss