Mad River
Members-
Posts
47 -
Joined
-
Last visited
-
Hi @Joel Bodenmann, Seems like you don't read all the post: Anyway, everything is working now. Thank you for the support. I will test some more advanced features now.
-
In the gdispDrawString(), I changed this: g->t.clipx1 = 32768; //x + mf_get_string_width(font, str, 0, 0) + font->baseline_x; for this: g->t.clipx1 = x + mf_get_string_width(font, str, 0, 0) + font->baseline_x; // 32768; And the function started working. Is it something to be worried about?
-
I copy-pasted it wrong! In fact, I tried only one line at a time: font = gdispOpenFont("DejaVu*"); line1 = "abcdefghij"; //gdispDrawString(0, 0, line1, font, White); // 1 gdispFillString(0, 0, line1, font, White, Black); // 2 @Joel Bodenmann So, it is exactly how I was expecting it to be. But for some reason the gdispDrawString() is not showing anything in the display. It is the only function existing in the gdisp that is not working properly. One quick question: will a horizontal scroll function be included in the library? I only found a vertical one.
-
What gdispDrawString() is supposed to do? I tried the following code: font = gdispOpenFont("DejaVu*"); line1 = "abcdefghij"; gdispDrawString(0, 0, line1, font, White); // 1 gdispFillString(0, 0, line1, font, White, Black); // 2 "// 2" Works just fine. "abcdefghij" is shown in the display. "// 1" Nothing happens. Already tried to change between "White" and "Black", still nothing happens when using "// 1".
-
Hi @cpu20, The "Index->Rebuild" worked. Thank you very much!
-
Hi @Joel Bodenmann, In order to solve the mirrored display problem, I made a few modifications to the pixel drawing function of your library. It worked, but I wasn't satisfied. So, I started looking in the internet for a way to flip the content of the display through commands. I found a function in another library that allows to flip the mirrored display using a command: /*---------------------------- Func: view Desc: ssets the display viewing direction Vars: direction (top view 0xC8, bottom view (default) = 0xC0) ------------------------------*/ void dog_7565R::view(byte direction) { if(direction == VIEW_TOP) { top_view = true; command(0xA0); } else { top_view = false; command(0xA1); } command(direction); clear(); //Clear screen, as old content is not usable (mirrored) } I already tested it here and it works perfectly without any modifications to your drawing pixel function. I am using your library as it is. I believe this function can be included in your product.
-
Hi @cpu20, Have you finished testing the uGFX in Eclipse? I am getting a wierd behaviour from my Eclipse. The IDE is graying out code that should be "visible". The wierd thing is that the IDE is doing it to some parts and not for others. Below you can see a example of it: I have defined: #define GDISP_NEED_CLIP TRUE #define GDISP_NEED_CIRCLE TRUE #define GDISP_NEED_DUALCIRCLE TRUE #define GDISP_NEED_ELLIPSE TRUE #define GDISP_NEED_ARC TRUE #define GDISP_NEED_ARCSECTORS TRUE Then, in the gdisp.h, it is showing the GDISP_NEED_CLIP code, but not the others: The program works. I can compile it, load the program and draw boxes and circles. But, as it is grayed out, I can't use functions like "go to definition" or even set breakpoints in the grayed code. Besides that, it became very hard to scroll trought the code and see whats is really being used and what is not.
-
Hi @cpu20 and @Joel Bodenmann, Is there a way to define where the coordinate (0,0) should be? I am running this code here: gdispFillString(0, 0, line1, font, White, Black); // Draw a text at coordinate (0,0) gdispDrawCircle(width-15, height-15, 10, White); // Draw a circle at the bottom right side of the display gdispDrawBox(0, 0, width/2, height/2, White); // Draw a box at coordinate (0,0) I was expecting to see this: But the display shows: Even if I rotate it 180º it won't be correct:
-
-
I just saw that the drawing is working! But I need to look from the bottom of the display. It is problably related to the configured contrast or something.
-
@Joel Bodenmann, Sorry, I edited my previous post before seeing your reply. Anyway, the gfxAlloc works. I am using monochrome and trying to write Black. Is it correct? #define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_MONO gdispDrawBox(10, 10, width/2, height/2, Black);
-
Hi @Joel Bodenmann, LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { // The private area is the display surface. g->priv = gfxAlloc(GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8); if (!g->priv) { return FALSE; } This gfxAlloc works ok. It allocates 1024 bytes for the display.
-
I checked the signals (RST, CS, A0, Data) and the communication with the display is ok. The problem is that the data sent to the display is all zeros. Is the screen buffer the GDisplay.priv pointer? Looking at the memory area pointed for this all is set to zeros. What can I do to check if the drawing functions are correctly writing to the buffer?
-
Everything is compiling now. width = gdispGetWidth();height = gdispGetHeight(); Above is returning 128 x 64, as expected. Now, I added: #define GDISP_NEED_AUTOFLUSH TRUE #define GDISP_NEED_VALIDATION TRUE #define GDISP_NEED_CLIP TRUE gdispDrawBox(10, 10, width/2, height/2, Black); gdispFillArea(width/2, height/2, width/2-10, height/2-10, Black); gdispDrawLine(5, 30, width-50, height-40, Black); But nothing is shown on the display. I tested it again with another library and the hardware is working. Is any more config needed to show the requested drawings in the display?
-
Well, I added _gosHeapInit() to the gos initialization and now it can successfully call gfxAlloc(). #if GFX_USE_OS_THREADX void _gosInit(void) { #if GFX_OS_NO_INIT && !GFX_OS_INIT_NO_WARNING #warning "GOS: Operating System initialization has been turned off. Make sure you call tx_kernel_enter()." #endif // Set up the heap allocator _gosHeapInit(); }