Jump to content

chrisjn52

Members
  • Content Count

    41
  • Joined

  • Last visited

Everything posted by chrisjn52

  1. chrisjn52

    Online Font Converter

    Is the online Font Converter working? When using from https://ugfx.io/font-converter the browser drops through to https://fonts.ugfx.io/index.php whereupon it displays the "could not import font - bad file format" message. I am using windows font file arial.ttf and I cannot get it to work with any character filter. I would use the built-in font converter in uGFX Studio but I want to restrict the conversion to a custom range to include the Greek Omega character and Studio won't allow a range beyond 255? Is there a way in uGFX Studio to limit the Custom Range to include just the Omega character, (U+03A9)?
  2. chrisjn52

    Online Font Converter

    Hi Joel, I tried again this morning and I can confirm that there are two reasons why I have been having a problem. The first is that the converter fails if the font file is selected directly from the Windows font folder, but works ok if the font is within some other folder. ????? The second reason is that I was trying to obtain a large font and all font sizes over 20px fail for Arial.ttf causing the webpage to drop through to https://fonts.ugfx.io/index.php. I also tried another font, (Candara), and font sizes >21 fail for this font. I used numeric only conversions to limit the file size in each case. Incidentally, I also found that it is necessary to refresh the browser page before attempting a second conversion request in order to get rid of the "No Entry" symbol when hovering over the "Get .C File" button.
  3. chrisjn52

    Online Font Converter

    Hi Joel, I am still seeing the same issue, although I now see the file upload percentage in the browser lower left corner which I don't recall seeing before. It still complains about "could not import font - bad file format" despite trying several different ttf fonts? Should I see some sort of confirmation that the request is valid/has been accepted, once the "Get .c File" button is pressed? (I haven't used the Font Converter for some time until recently).
  4. Could you confirm whether there are any plans to create a numeric control widget such as is shown here, (Amplitude [V]), before I attempt to create one based on the textedit widget with dial input capability?
  5. chrisjn52

    Windows Font Files

    Whilst attempting to use a Windows font file as the basis for generating different sized fonts in Studio I found that the C:\\Windows\Fonts folder isn't displayed in File Explorer or Studio in Windows 10. In order to resolve this I resorted to a Google search and implemented a fix by editing the Desktop.ini file in the C:\\Windows\Fonts folder to contain the following: [.ShellClassInfo] [ViewState] Mode= Vid= FolderType=Generic The Windows font folder can then be accessed in File Explorer and Studio.
  6. chrisjn52

    ST7735 Driver

    I had problems with driving a 1.8" LCD when using the ST7735 driver that is currently a part of the uGFX V2.8 library. I found that unless the FRMCTR1 register had the RTNA byte was set to >2, even if the front and back porch bytes are adjusted accordingly, the display simply had a few vertical lines. Several ST7735 datasheets can be found on the web and the early variants had a different oscillator frequency and frame rate calculation which may go some way to explain why I was having problems. That said, I don't see why RTNA should not be set <2 provided that the overall frame rate isn't too high? Does anybody have any other datasheets/manuals etc that may help to explain this anomoly? It would seem from some of the forum comments that the ST7735 driver may not be fully supported as it may have some copyright issues but unless problems like this can be explained it would be hard to ensure any new driver supports all controller revisions. The attached photo shows the type of display I am using and is fairly typical of those that can be purchased on Ebay or Aliexpress.
  7. chrisjn52

    Closed Arc Fill

    I can appreciate how this would speed things up but I have very limited RAM in the STM32F103 so pixmaps of any appreciable size are not feasible. I am not familiar with all the variations in hardware capability of each microcontroller and TFT driver chips but I don't believe I have any other options for faster drawing on the STM32F103 and a ILI9341 controller that I am using, but please correct me if I am wrong. I am attempting to write a dial/meter widget much like this, which requires dynamic display of the segments that require updating. Whilst my original simple approach worked, it suffered from display artifacts due to the time delay in overwriting part of the arcs with the circle, (only for increasing meter vales).
  8. chrisjn52

    Closed Arc Fill

    Are there any plans to create a function that fills two concentric arcs as shown below? I have tried using a gdispFillArc() and overwriting with a circle in the background colour which is fine for a static shape but too slow for any dynamic display. Would a variant of the gdispFillArc() function be the best way forward?
  9. chrisjn52

    Closed Arc Fill

    Duh, I've missed a simple solution, rotate small polygon segments about the axis of a circle such that they form a continuous arc! The narrower the polygon, the more accurate the arc formation. This should still be much faster than the hardware is capable of filling all the pixels of a much larger circle in order to overwrite most of the the gdispFillArc() segments.
  10. chrisjn52

    Eclipse Project Example

    You may need to add paths to any driver files, eg. Stm32SystemWorkbench\ugfx_2.5\drivers\ginput\touch\ADS7843 but that doesn't sound like the fundamental issue. Are you using the single file inclusion method as per this link? Can you send me a screenshot of the errors and the path setup?
  11. chrisjn52

    Eclipse Project Example

    It sounds like you need to tell Eclipse the path for the uGFX source files in the project properties.
  12. chrisjn52

    Menu Widget

    This demo widget code is for a horizontal user defined menu which consumes minimal screen real estate and is fully data-driven. The definition of the menu is declared using two statically declared structures which are independent of the widget render and handler functions. Two icons, (Home & Up) are used to return the menu to the home level or up one level respectively. A menu item is underlined if a child sub-menu exists and the sub-menu replaces the displayed menu when clicked. An event is generated for any menu item that is not underlined when clicked. A short video is attached showing the menu in operation. Menu.zip Video.zip
  13. chrisjn52

    Spinbox Widget

    Version 1.3 submitted after a final polish. Version changes described at top of gwin_spinbox.c file uGFX_Spinbox_1.3.zip
  14. chrisjn52

    Spinbox Widget

    I'd like to enter my Spinbox Widget into the competition. The screenshot shows it running in a Win32 console with a selection of fonts to show the automatic sizing of the widget to the font. The spinbox.h file contains additional notes, features and usage etc. Spinbox.zip contains the Spinbox source and Win32 console demo files. I have also included a short video of the Spinbox demo in action. uGFX_Spinbox.zip Win32Spinbox.MP4
  15. Yes, I want to be able to compile for Win32 but I have been putting off due to imminent replacement of my aging PC. However, I decided to give it a try anyway and loaded the required MingW & CygWin toolchains and followed the guide here but I get this error message: c:\Temp\Win32Demo\Demo>make 0 [main] make 5128 child_info_fork::abort: c:\cygwin\bin\cygiconv-2.dll: L oaded to different address: parent(0x2F0000) != child(0x440000) make: fork: Resource temporarily unavailable Any ideas?
  16. chrisjn52

    Cygwin compilation problem

    I have now managed to compile and link the Demo to a console application which runs perfectly. In order to get it to work I renamed main() to Winmain(), whereupon it still failed with an undefined reference to `WinMain@16'. After renaming the function back to main() the code then linked without error. Incidentally, as you can see from the top post, I intended to reply to Joel in the Spinbox Widget thread in "Support" but I must have posted back to "Development and Feedback" inadvertently.
  17. chrisjn52

    Cygwin compilation problem

    I tried with -mconsole switch to no avail. I'm using GCC 4.9.2 which may be an issue according to this unless I am mistaken? $ i686-w64-mingw32-gcc --version i686-w64-mingw32-gcc (GCC) 4.9.2 How do I downgrade GCC to avoid this, (I have been unsuccessful in finding a package and method thus far).
  18. chrisjn52

    Cygwin compilation problem

    I'm using Win7. I checked for additional files in Windows folders but none were found. However, I found the answer in this post here and the make progresses further after using the the following rebaseall command in dash: $ ./rebaseall -b 0x5fe50000 The make then failed with the following: Compiling ../uGFX/src/gfx.c make: i686-pc-mingw32-gcc: Command not found This was fixed by renaming the compiler executable name in the Makefile thus: #ARCH = i686-pc-mingw32- ARCH = i686-w64-mingw32- Unfortunately the Linker now fails as shown below: Linking .build/Demo.exe /cygdrive/c/Users/Chris/AppData/Local/Temp/cc9tSOjS.ltrans0.ltrans.o:cc9tSOjS.lt rans0.o:(.text+0x2380): multiple definition of `main' /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib32_libmingw32_a- crt0_c.o):/usr/src/debug/mingw64-i686-runtime-4.0.6-1/crt/crt0_c.c:17: first defined here /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/libmingw32.a(lib32_libmingw32_a-crt0_c.o): In function `main': /usr/src/debug/mingw64-i686-runtime-4.0.6-1/crt/crt0_c.c:18: undefined reference to `WinMain@16' collect2: error: ld returned 1 exit status make: *** [../uGFX/tools/gmake_scripts/compiler_gcc.mk:284: .build/Demo.exe] Error 1 Could this issue be related to my Cygwin/MingW installation in some way?
  19. chrisjn52

    Spinbox Widget

    Video of my first ugfx project - a numeric Spinbox widget. Hardware is STM32F103C8T6 using RAW on 320x240 SPI colour display. Useage - ghSpinBox1 = gwinSpinboxCreate(0, &wi, 0, -200, 200, 5, ".", 2, "V"); // init, min, max, step, decimalmark, places, units Apologies if video a little shaky, it was difficult to use sylus between camera and fragile breadboard setup. P1000162.MP4
  20. chrisjn52

    Spinbox Widget

    You seemed to have found some warnings that I was not aware of so I checked my GCC compiler project settings and the All Warnings (-Wall) is set as default in the ST System Workbench Eclipse IDE. I then added the Extra Warnings (-Wextra) option which added a few more of the warnings you have mentioned. Please let me know if there are any other GCC compiler warning options that you would recommend. I believe I have addressed the issues in the code that you have highlighted and the revised code is attached. gwin_spinbox.c main.c gwin_spinbox.h
  21. chrisjn52

    Spinbox Widget

    I have attached the Spinbox source with a demo main() with the optimization you suggested, along with a short video. The spinbox now also caters for text as well as numeric data. Only mouse/touchscreen input is currently catered for. Any suggestions/improvements on the code, methods or style would be welcomed. gwin_spinbox.c main.c gwin_spinbox.h P1000165.MP4
  22. chrisjn52

    Spinbox Widget

    Just found this thread which seems to suggest I could possibly do a partial redraw from within the spinbox mouseup function, something I had also considered.
  23. chrisjn52

    Spinbox Widget

    I must confess that I am unsure of the best way to achieve the partial redraw from an architectural standpoint. I have considered setting a flag when a spinbox mouseup event occurs so that my gwinSpinboxDefaultDraw() function will only do a partial redraw but I haven't tried this as I am not sure if it will work or whether there a preferred or more elegant method I should use? This leads me to question why I am redrawing the whole widget if only a partial redraw of the text within is possible. Clearly I am missing something here. I have looked through the examples & widget sources but I don't see any that seem to cater for a partial redraw.
  24. chrisjn52

    Spinbox Widget

    Thanks for your encouragement and optimisation suggestion. I'll share the source once I have looked into this.
  25. chrisjn52

    gdispGFillConvexPoly Behaviour

    You are correct, adding 1 to the x axis for the two right hand side coordinates of the up arrow improves the uniformity and the aesthetics when viewed in close proximity to a down arrow that serves as a visual reference.
×