Comments (7)
Hi @balwantbishnoi27 --
Thanks for letting me know about your error message. To help narrow down the cause for you, could you let me know a couple details:
- Could you clarify which two programs you were running? eg.
test-sdl1
,test-sdl2
,gslc-ex01
, etc. - In
GUIslice_config_linux.h
, what option was enabled forDRV_DISP_*
? - What option was enabled for
DRV_TOUCH_*
?
thx
from guislice.
@balwantbishnoi27 -- thank you for the detailed report.
It looks like you are encountering two setup issues:
- SDL config setting for
SDL_VIDEODRIVER
- Missing font installation
Can you indicate what device model and LINUX distribution you are using? eg. Raspberry Pi with Raspbian, etc. Some of the configuration will be dependent upon your particular environment.
For Issue1)
- It appears that the default setting for
SDL_VIDEODRIVER
offbcon
isn't correct for your Waveshare LINUX installation. You can probably avoid the error (in gslc-ex01) by commenting out the following line inUserInitEnv()
:
setenv((char*)"SDL_VIDEODRIVER","fbcon",1);
- Can you tell me what is output from the following at the command prompt?
printenv | egrep SDL_VIDEODRIVER
printenv | egrep FRAMEBUFFER
For Issue2)
- As for the
TTF_OpenFont()
error, it appears that you don't have the DroidSans font installed in your LINUX environment. - I believe this font is normally installed in the Raspberry Pi Raspbian distribution, but perhaps you are using a different LINUX distribution?
- If you run
fc-list
at the command prompt you should see a listing of all your installed fonts. You can either substitute the#define FONT_DROID_SANS ...
path with another existing font, or else install the DroidSans font manually. I think you can install it withsudo apt-get install droid-fonts
from guislice.
Glad to hear that the updates worked!
As for TsOpen()
, it seems possible that the TSLIB_TSDEVICE
config parameter might not be matching your particular environment setup.
- When you installed tslib, was it from sources? (please refer to the steps on my Installing tslib page).
- Could you report the output of the following from the command-line?
ls -l /dev/input/
It may be easiest to email me directly at guislice at impulseadventure (.com) so that I can determine how your setup might be different from the typical RPI defaults. For the benefit of others, I could then summarize the updates here later.
thanks!
from guislice.
I have tslib and SDL library installed and i done test for both libraries.
TSLIB :
sudo TSLIB_FBDEVICE =/dev/fb1 ts_print WORKING
sudo TSLIB_TSDEVICE=/dev/input/touchscreen ts_print WORKING
sudo TSLIB_FBDEVICE=/dev/fb1 ts_test NOT WORKING
sudo TSLIB_TSDEVICE=/dev/input/touchscreen WORKING
Now i use Makefile to compile example programs
Case 1:
#define DRV_DISP_SDL1
#define DRV_TOUCH_NONE
Result for gslc-ex01, ..gslc-ex02......gslc-ex11
ERROR : DrvInit() error in SDL_Init(): Unable to open /dev/fb1
ERROR : Init() failed
But for ./test-sdl1 it is working and getting pattern.
Case 2:
#define DRV_DISP_SDL1
#define DRV_TOUCH_TSLIB
Result for gslc-ex01, ..gslc-ex02......gslc-ex11
ERROR : DrvInit() error in SDL_Init(): Unable to open /dev/fb1
ERROR : Init() failed
But for ./test-sdl1 it is working and getting pattern.
Case 3:
#define DRV_DISP_SDL1
#define DRV_TOUCH_SDL
Result for gslc-ex01, ..gslc-ex02......gslc-ex11
ERROR : DrvInit() error in SDL_Init(): Unable to open /dev/fb1
ERROR : Init() failed
But for ./test-sdl1 it is working and getting pattern.
Case 4:
#define DRV_DISP_SDL1
#define DRV_TOUCH_NONE
and I Commented UserInitEnv();
Result for gslc-ex01 :
A black rectangle box in left hand side . Working fine.
Result for gslc-ex02:
ERROR: DrvFontAdd(/usr/share/fonts/truetype/droid/DroidSans.tft) failed in TFT_OpenFont failed
Segmentation fault
Thanks.
from guislice.
First i would like to Thank you for help you provided.
I am using Raspberry pi with following
Device : WAVESHARE 7inch HDMI LCD (C). USB Capacitive Touch Screen 1024 x 600 Pixel. Rev2.2
Distributor ID : Raspbian
Description : RASPBIAN GNU/Linux 9.4
Release : 9.4
Codename : Stretch.
Result for issue 1
-
Issue Resolved when I commented
setenv((char*)"SDL_VIDEODRIVER","fbcon",1);
inUserInitEnv()
and all code are running fine with following configuration
#define DRV_DISP_SDL1
#define DRV_TOUCH_SDL
-
I get NO Output from following at command prompt
printenv | egrep SDL_VIDEODRIVER
printenv | egrep FRAMEBUFFER
Result for issue 2
- Issue Resolved. I replace path of FONT_DROID_SANS with another existing font.
Issue Noticed
- When i am using following cofiguration in GUIslice_config_linux.h
#define DRV_DISP_SDL1
#define DRV_TOUCH_TSLIB
I am getting following error :
ERROR: TsOpen() failed.
ERROR: InitTouch() failed to touch driver init
ERROR: Init() failed
Thanks @ImpulseAdventure
from guislice.
A quick update: I understand from @balwantbishnoi27 that a change to the touch configuration resolved the Waveshare touchscreen functionality. In his case, with multiple USB device enumerations, the touch device (GSLC_DEV_TOUCH
) configuration needed to be mapped to "/dev/input/event2"
Closing
from guislice.
Hi, @ImpulseAdventure
Thanks for your help to resolve issue faced by me for Waveshare Touchscreen Functionality. I would like to thank you for this amazing library you created with touchscreen Functionality for Raspberry Pi. I am loving it man Awesome..
Thanks,
from guislice.
Related Issues (20)
- Is this project still maintained? HOT 3
- Image redraw and text flicker - TFT_eSPI/ESP32/ILI9488 HOT 2
- Compiling on arduino IDE HOT 1
- Touch IRQ (STMPE610) HOT 2
- Detect a button press in a while loop HOT 15
- Provide global interceptor for touch events HOT 3
- Creating Element Alias for Toggle Button - Compile Error HOT 6
- Add-st7789-support HOT 1
- Custom BMP wont load on ILI9341 ft6206 HOT 2
- gslc_SetPageCur does not work reliably HOT 4
- Flipped X and Y coordinates HOT 2
- Config file for ESP32 / ILI9488 / GT911 capacitive touchscreen using TFT_eSPI library HOT 1
- Arduino 1.8.19, Ubuntu 22/04, On compile: "fatal error: SDL/SDL.h: No such file" HOT 1
- Elegoo 2.8 TFT Shield config issues HOT 1
- Arduino HOT 1
- GUIslice_drv_adagfx.cpp is missing button support for Adafruit 1.8" TFT Shield with Joystick (code in description) HOT 5
- Pico W on TFT ILI9486 No TouchParallel with TFT_eSPI HOT 7
- Arduino UNO R3 + Waveshare 2.8 TFT Touch Screen result in error: 'HX8347D_kbv' HOT 1
- feature request: page flag: show/hide base page HOT 2
- The button is pressed without touching the display HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guislice.