Jump to content

kengineer

Members
  • Posts

    79
  • Joined

  • Last visited

Everything posted by kengineer

  1. A very similar issue I found is the ability to setup extreme coordinate calibration, it doesn't exist without modifying those flags in the graphics library. The wiki claims it can be enabled by setting: #define GINPUT_MOUSE_MAX_CALIBRATION_ERROR TRUE However, I don't see how this can be the case as this define is not referenced anywhere in uGFX library code other than in a board file (where it doesn't appear to be utilized). This would require the user to set the flags in that same location. A suggestion I would have would be to avoid all of these and similar situations, is to create a single #define for the flags used by the VMT in gmouse_lld_MCU that is defaulted (via ifndef) to the curent flags that are set now. Then the user if they so desire could add a #define to define the flags to their liking.
  2. I suppose I could also just call ginputSetFingerMode within the init_board function in the MCU driver board file or set the flags from the mouse object pointer passed.
  3. Hi Joel, Yeah I saw that, but this would require modifying the graphics library code since it resides within the driver and not the board file (I could pull it out of the library I guess).
  4. I was just wondering what the proper way is to default my system to finger mode for the GINPUT/mouse input. I know there is a function call to put it into finger mode, but I'm wondering how to default it to do this properly that way it is done before it reaches the calibration screen (which is called by gfxInit). I could put the call inside the LoadMouseCalibration function but wanted to know if there's a better way to do this.
  5. Or is this already handled? I've seen calls to them in the code so I'm guessing it is but want to verify. But for example, if I'm using a variable that gets called by a GTIMER callback and the GINPUT thread...
  6. I know immediate redraw can be configured globally by setting the appropriate config however I was wondering if there was a way to implement immediate redraw only by function call. Originally I've had ugfx configured for default normal redraw mode. Often when I'm doing a screen transition along with hiding and showing new widgets, I'm also doing some gwin draw functions. However, I've run into a situation where because of the normal redraw mode (not immediate) it ends up out of sequence and therefore doesn't yield the desired result always. Globally enabling immediate redraw solves this, but I'm wondering if there's a call that I can invoke in order to do this on an as needed basis. Would gwinRedraw() work for this?
  7. Convenience mainly, I'm using an icon as a button and wanted to add some other things like text attributes and would be nice if it could autosize based on all these. I guess the better way to do this would be to implement by own custom widget to do this based on the button widget.
  8. I've setup a custom draw function for a button that I use to include an image in the button. I'd like the size to be based on the size of the image, so in the custom drawing routine, I tried resizing the widget by setting the values of gw->g.width and gw->g.height However this does not seem to work. I'm guessing this is because there needs to be some call to update these parameters with the window system. Before I dig into this further, I wanted to verify if this is even possible.
  9. No problem I got it working like you suggested. Thanks for the info!
  10. Also, it doesn't look like these inputs are debounced, correct?
  11. Just wondering about the proper usage of the toggle driver. The readme file in the driver says that after enabling the driver you just need to create a toggle board file, however, it seems that the "ginput_lld_toggle_Pal" contains functions specific to Chibios (palSetGroupMode & palReadBus). Should I copy this file out into my application and replace those functions with my GPIO functions or should I implement palReadBus and palSetGroupMode on my platform?
  12. With a project I'm working on with uGFX, I'm able to successfully read BMP files off a files system and then draw them to the screen (SPI using ILI9341). I'm trying to modify the driver to get DMA support for Blitting images however I've run into an issue. Because of the way 16 bit ints are stored (like color_t), this ends up flipping the high and low bytes and therefore the colors are messed up on images. Is there a built in option in uGFX to handle this kind of thing or is this going to require me to modify the image decoder? This doesn't happen with the non dma writes because each pixel is broken up as separate bytes with the following macro rather than just reading straight through memory: #define write_data16(g, data) { write_data(g, data >> 8); write_data(g, (uint8_t)data); } I know I could also read the buffer into another buffer and reverse the bytes and then DMA that but I want to see if there is a better solution.
  13. What is the proper way to close an open file for an image box? The image box example included in uGFX use a memory example and not a file one. I am using a limited performance system and can't open too many files at once. The idea I had would be to open the file, show the widget, then close the file. I understand that if I want to do something that requires a redraw (like move) I will need to open the image again. I was able to do this already but am not sure if there is a better or more proper way: gwinImageOpenFile(HDL_IMG, "image.bmp"); gwinShow(HDL_IMG); gdispImageClose(&((GImageObject *)HDL_IMG)->image);
  14. This ended up being a clean build issue. After I cleaned and rebuilt it worked.
  15. Yes it works with the gdisp call. I'll work on a short example to post here with my problem. FYI, I discovered possibly a bug or unhandled behavior when I was investigating this issue. If you don't set the default font, and you create a label widget without the width or height set, it will end up passing a null pointer to the getwidth/getheight function.
  16. I do that, widget is invisible by default. I call gwinSetFont, then make it visible and then I call a redraw. Doesn't work. Only calling gwinSetDefaultFont before the widget is created results in a change of font.
  17. I'm attempting to use gwinSetFont to set the font of a label widget I have created it. I open the font and then pass this to gwinSetFont along with the handle of the label object. I cannot get this to work at all. I've tried calling this for the parent container as well and calling gwinRedraw and nothing seems to work. It just seems to default to the smallest font. I'm using uGFX 2.5. What does work however, is calling the gwinSetDefaultFont instead before the widget is created.
  18. I'm wondering what the preferred method would be for reading images off of non addressable external memory (i.e. a SPI Flash). Obviously this isn't difficult if we are running something like FATFS on the external medium as this integrates perfectly with the GFILE module - but if we're not, what is the best method to do this? Also, this is a low performance system, so I don't have huge amounts of RAM that I can use to cache images.
  19. I have implemented a custom draw function for a button (image icon). Due to performance limitations on my system, drawing images is somewhat slow. Because of this, I don't want uGFX to call the draw function every time I press the button as this is unnecessary (I'm not changing the icon upon press) and results in latency. Is there a native or built in way to uGFX that I can implement this?
  20. Here's another question, if I do want to use FATFS that's built into uGFX, how do I use my own disk.io file. After setting GFX_USE_GFILE & GFILE_NEED_FATFS and adding my own diskio files to my project to compile, it recognizes that there are identical functions in the disk.io.c/h files in uGFX due to: #if GFX_USE_GFILE && GFILE_NEED_FATFS #include "gfile_fs.h" #include "gfile_fatfs_wrapper.h" and #include "../../3rdparty/fatfs-0.10b/src/diskio.h" How do I make it see my own diskio functions without modifying uGFX?
  21. I was wondering if it's possible (easily) to use FATFS external to uGFX with uGFX. I already have a FATFS port (r0.09) working for the platform I am on (can write files to an SD card) and was wondering if it is easy to use this with the GFILE module and what I would need to do this. I would like to use the uGFX contained one eventually, but due to immediate tasks at hand since my version is already working would prefer to use it if possible.
  22. Forgive me, this was due to my own ignorance. I wasn't thinking about justification within the context of the label width itself but rather the label on the screen. I had created the label without defining the width. Therefore the size was just the amount needed for the text, and therefore justification doesn't do anything different in this case. Now I've defined the width as the width of my screen and this works. Appreciate it!
  23. Hey guys, I'm trying to place a label with center justified text. I do this during the widget init by passing the address of the function to the custom draw parameter in the widget init struct: wi.customDraw = gwinLabelDrawJustifiedCenter; However, this isn't working. I can literally make two labels, one with that function passed and another without and they look exactly the same (not center justified, text starts at the x,y location).
  24. Hi Joel, What I'm saying is that the widget is not getting "erased" with the background color that I specified for the widget, it's white instead (I specified a non white custom color for the background in the custom style used for the widget).
×
×
  • Create New...