Giter Club home page Giter Club logo

Comments (10)

moononournation avatar moononournation commented on July 20, 2024

from arduino_gfx.

marcmerlin avatar marcmerlin commented on July 20, 2024

thanks for your reply, it's just a suggestion since I went through the same thing than you with my set of 2D libraries. Having a file with definitions that you can include, makes things easier in my opinion, but you can decide what's best for you.
I will add support for your library in mine, and will contact you when I'm done. This will allow a lot of FastLED and LEDMatrix code to work on top of your libraries
Something like this: http://marc.merlins.org/perso/arduino/post_2019-05-26_FastLED_SPITFT_GFX-on-top-of-Framebuffer_GFX-for-SPI-TFTs-like-SSD1331-or-ILI9341.html

from arduino_gfx.

moononournation avatar moononournation commented on July 20, 2024

Another alternative is build a Wiki for Arduino_GFX and simple drop a link in code comment.

from arduino_gfx.

marcmerlin avatar marcmerlin commented on July 20, 2024

That works too. I'll leave it up to you, it's your library and your choice ;)

from arduino_gfx.

moononournation avatar moononournation commented on July 20, 2024

Just commit the changes, only PDQgraphicstest.ino keep the long version. Is it good enough?

from arduino_gfx.

marcmerlin avatar marcmerlin commented on July 20, 2024

I think that helps the other examples, yes. Thank you for that.

Now, if it were me (and what I did in my lib) is to use an include file where the screen is defined
You could have
https://github.com/moononournation/Arduino_GFX/tree/master/examples/arduinogfx.h
and move the TFT definition there.
Then, all examples include the file.

After that when I use your library, I only have to edit arduinogfx.h , and all the demos would work.
Then if I change my TFT for another kind, again, I only change arduinogfx.h once, and all the code works.
How does that sound?

from arduino_gfx.

moononournation avatar moononournation commented on July 20, 2024

Arduino IDE not show header files at parent folder, user cannot read that file easily. And also when you start a new project from save as an example, the header files at parent folder will not copy to new project folder and that is not easy to fix for beginner.

from arduino_gfx.

marcmerlin avatar marcmerlin commented on July 20, 2024

Thanks for letting me know. So, in my library, I cheat: I use symlinks
#include "config.h"
and
config.h is a symlink to ../config.h which is shared by all the demos.

It works great on linux and MacOS, but not on windows which does not support symlinks :(

I really wish there was a simple solution to this need that works for everyone, your library and mine have the same exact need.

from arduino_gfx.

marcmerlin avatar marcmerlin commented on July 20, 2024

I posted the question here, maybe we'll get a good suggestion: https://forum.arduino.cc/index.php?topic=731975

from arduino_gfx.

marcmerlin avatar marcmerlin commented on July 20, 2024

the answers I got, were

  1. symlinks (like i do), but they don't work on windows, so not great
  2. have the definition file be inside the library directory, that way you can include "arduinogfx_config.h" and the arduino manager will automatically find the file inside your library directory.

I'm not sure if you like option #2 , I'll let you decide.

from arduino_gfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.