New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiles and runs #6
base: master
Are you sure you want to change the base?
Conversation
|
||
#ifdef HAVE_TOUCHPAD | ||
Serial.println("Initializing touch screen..."); | ||
if (!ts.begin()) { | ||
if (!ts.begin(0x48, &Wire)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add preproc logic here to call the STMP begin. This worked with local testing:
#ifdef TOUCH_CS
if (!ts.begin()) {
#else
if (!ts.begin(0x48, &Wire)) {
#endif
#ifdef TOUCH_CS | ||
#include <Adafruit_STMPE610.h> | ||
#else // use I2C | ||
#include <Adafruit_TSC2007.h> | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some Arduino reason, the #define
of TOUCH_CS
in settings.h
is not being seen here. So the logic always #includes the TSCC2007 header and the build fails at link time.
Suggest moving the #define
of TOUCH_CS
to this file and place immediately above this preproc logic. Can then add a comment in settings.h
that this needs to be done for STMP. This worked with local testing.
sorry guys...this is all clear as mud to old simple over 60 people like me. anyway to get updated files with all the corrections and changes so I can download compile and run? |
fixes compile errors and works with TSC2007 now