jbsull Posted November 1, 2017 Report Share Posted November 1, 2017 Hello, I am modifying the ChibiStudio stm32f4-discovery project - which I have running --- to use the output files from uGFX Studio. How do I set this up ? - I copied all the files, and the resources directory. It looks like I need to modify main() , and add guiInit().. and remove a few things. I thought I saw instructions somewhere , but I misplaced them. But, in case you have an already modified main.c somewhere.... Jim Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 1, 2017 Report Share Posted November 1, 2017 Hello Jim, It's correct that you copy all the files of the generated output directory (generated by the µGFX-Studio) to your project. Once you added the necessary files you just have to add the call to guiInit() to your main.c. Here's the most minimalistic main.c that we use for testing purposes: int main(void) { gfxInit(); guiInit(); guiShowPage(DISPLAY_PAGE); while(1) { gfxYield(); } } of course your main() can contain other things as well. You really just add the functions you can find in gui.h to interact with the GUI. I hope that helps. Don't hesitate to ask if you have any further questions. Link to comment Share on other sites More sharing options...
jbsull Posted November 1, 2017 Author Report Share Posted November 1, 2017 There seems to be a conflict in font names in _RESOURCES_MANAGER_H, and gui.h. gui.h font_t DejaVuSans12; font_t phpoXxi1Y; font_t DejaVuSans24; _RESOURCES_MANAGER_H #define DejaVuSans12 0 #define phpoXxi1Y 1 #define DejaVuSans24 2 What to do ? Jim Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 1, 2017 Report Share Posted November 1, 2017 Hello Jim, I just fixed that in the software. Will be part of v0.20.6 that should be released in a few hours. Simply delete the font_t declarations in gui.h. They are not needed. Use gstudioGetFont() if you need access to a font in your code. Example: font_t f = gstudioGetFont(DejaVuSans12); Link to comment Share on other sites More sharing options...
jbsull Posted November 1, 2017 Author Report Share Posted November 1, 2017 Problem solved ! Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 1, 2017 Report Share Posted November 1, 2017 That's great! We're preparing a few new icons for the new version now. Anything else that comes to your mind? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now