Jump to content

PaulB

Members
  • Content Count

    10
  • Joined

  • Last visited

About PaulB

  • Rank
    Newbie
  1. PaulB

    uGFX 2.8 gfxQueueGSyncGet

    Thanks for the reply. What you say is correct, when the timespec is being set to a milliseconds value, as in ts.tv_sec = ms / 1000; ts.tv_nsec = (ms % 1000) * 1000000; I may well have missed something, but in gfxSemWait, the milliseconds value is being added to an existing timespec, which already has a nsec component. The sum of the existing and new fractions may well be more than 1E9 ns, which is invalid. (Putting in a debug check for this condition shows that it often is). This is what I meant by overflow, sorry that was a misleading term.
  2. I am using gfxQueueGSyncGet with a timeout, and it often returns immediately without waiting, when there is nothing in the Q. It uses gfxSemWait, and here I think there is a problem with adding the delaytime (in ms) to the timespec. It has the following two lines : tm.tv_sec += ms / 1000; tm.tv_nsec += (ms % 1000) * 1000000; This can set tv_nsec to be more than 1E9, and the following call to sem_timedwait then fails immediately with errno set to EINVAL, instead of waiting for timeout. I think that any overflow of tv_nsec should be added as another sec : tm.tv_sec += tm.tv_nsec / 1000000000; tm.tv_nsec %= 1000000000; I imagine that this will also affect anything else that uses gfxSemWait. Regards
  3. Not at all, I really appreciate all your feedback. Its good to hear that pixmaps will be officially supported with single-file make in V3. Are you able to give an approximate time for when this will be available ?
  4. Ok, I get the message I will check for other options as well...
  5. For your info, I have gone the pixmap route for now, and I will check out custom widget rendering later. Also for your info, after enabling pixmaps in the conf.h, I got compile errors regarding GDISPVMT_pixmap being undefined, and various other things. I am of course using the single file inclusion way of building uGFX in an IDE, and after checking a few forum posts about this, there didn't seem to be much hope. However, I moved just gdisp_pixmap.c into my local project, eventually realised I had to also remove gdisp_pixmap.c from the gfx_mk.c, and this fixed the build, and the pixmap worked with just a label. For your info again, I tried replacing the Display in my existing gwinImageCreate so that the image went through the pixmap (uses gwinImageOpenMemory with native format memory buffer) and it failed miserably, displaying only parts of the image, very slow, and regularly crashing with memory errors. Then I tried the better way of copying the image directly onto the pixmap surface buffer, with no gwinImage at all, and this works perfectly. The live image and label on top are displayed with no flicker at all, same speed and cpu usage as before. So thanks for the help.
  6. Many thanks for these ideas, I will check them out. At the moment there is enough RAM available, but I don't want to slow down the refresh if possible. There are around 10 labels and icons overlaid on the image at present. I will have a look at both options. Thanks again.
  7. Yes, many thanks for the suggestions ! My situation is that now I have an updated driver for the touchscreen (we need to use this particular one), so it works well enough, but there was still no calibration program, and it was off just enough to make it difficult to use. I didn't realise that uGFX had its own calibration support. I have enabled the flag as you suggested and now I can calibrate and use it, so thats good. Thanks also for the updated mouse _read function. It works, but without a cursor its obviously difficult to use. I will keep this and come back to it when I have time, as I would like to get some mouse support with cursor working in the future. If I may ask about something probably similar to mouse cursors, I have a live image which needs several labels and icons (selectable) over the top of it. I have an initial version working using a GWin image widget, with a label widget over it. Every time the image updates, I have to update the label, and this obviously causes some flicker. I have tried a custom draw for the label so it doesn't fill its background, but its only a slight improvement. Would you be able to point me to any ideas about the best way to update an image whilst keeping text (or whatever) on top of it ? Regards
  8. Nothing to do with uGFX, I'm sure this will work. There are problems in the recent Beagle images regarding the 4D touchscreen, it doesn't work reliably in any situation, no way to calibrate etc, so hopefully there will be an update for this soon.
  9. Ok, thanks for the information, at least I don't need to go searching any more for something that's not there. I'll see how things go, whether to try and implement a basic mouse cursor, or wait until the touchscreen is working. Regards.
  10. I am evaluating uGFX (2.8) on a BeagleBone Black, with 4D systems gen4 touchscreen. I have got the basic display test demo working, using the linux framebuffer driver. I have built and run the combo demo, using "gmouse_lld_linux_event_board.h" and "gmouse_lld_linux_event.c". For other reasons, the touchscreen is not currently working, and I want to use it with a USB mouse. The mouse works with the Beagle desktop manager GUI (LXQt), but not with the uGFX app. I have got GINPUT_NEED_MOUSE and GINPUT_TOUCH_NOTOUCH defined as TRUE. The mouse events arrive in the driver _read function, but it seems that only touchscreen type events are processed, eg "if (ev.type == EV_ABS" etc, in gmouse_lld_linux_event.c line 85. The mouse produces events of type EV_REL, and so no movement is processed. For button presses, there is a similar check on the event code, where it uses BTN_TOUCH (330) and not BTN_MOUSE (272) (from "input-event-codes.h") There is also no mouse cursor displayed. Is a mouse (and its cursor) supported in any way ? It seems that they should be, since files are named gmouse, and the documentation mentions touchscree/mouse for the linux framebuffer. Many thanks
×