Jump to content

cheater

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by cheater

  1. Dear ugfx Team, I hope this message finds you well. It's been a few years, almost a decade, since I initially worked on developing a speedometer for an electric vehicle, drawing inspiration from Tesla's design aesthetics. I wanted to reach out to share my progress and seek information about the ugfx Studio. Here's a link to the video showcasing the speedometer I developed: For reference, here's how Tesla's speedometer looks: Over time, I've received inquiries both in the comments section of the video and on this forum regarding the source code. I am now working on making the code public, but it's currently in a bit of chaos. I'm in the process of reformatting it, and I had the idea of creating a code generator for designing speedometers. In this context, I recalled there being a WYSIWYG editor from ugfx – the ugfx Studio. Could you please provide an update on the status of ugfx Studio? I'm considering developing a tool for my speedometer project, and I'm curious about the current state of ugfx studio. Moreover, I'm sharing the current progress of my speedometer project [App (blubal.de)], and I plan to create documentation that will explain the details in a more comprehensive manner, similar to my master's thesis but not as extensive. I appreciate your time and assistance. Looking forward to your response. Best regards,
  2. I get the chars via Bluetooth, when i display that stuff in hex its definetly äüö.
  3. and where can i found this offline converter? i was on the wiki page that linked me to that online converter. when i type in " " to "²" it does not include äöü
  4. How am i supposed to use the costum range? i cant enter a number
  5. hey, i had the same problem as you.if you want to use 24bit color depth, you need 3 write cycles of 8 bytes. just look into the ssd1963 specs. gdisp_lld_SSD1963.c gdisp_lld_config.h
  6. Edit: Moved from here. Hey Joel, today i wanted to improve performance by using gdispFillArc, but i discovered a bug. gdispFillArc(x, y, r, 79, 80, color); will create a full cirlce
  7. Yes its ugfx, and of course, i will share my code as soon as i think its ready for public. Just look into this small example, which i am actually using to design the arcs: https://jsfiddle.net/m5o6pagh/ The same works for ugfx if you translate the code, i actually use a modified version of the drawline function to put the pixel. This leads to some double drawing, becouse i use it excessivly to create a closed arc, but i will use the draw arc function soon to avoid this. To prevent that the numbers or the lines are overdrawn i use a "clipping map". It is just an bool array of the display size which i am using to make a lookup. I hope i could give you a small image of the process, i use a lot of gimp, javascript and imagination to design this.
  8. im currently developing such things for my master thesis
  9. Hi, have you tried it with my gfxconf.h? It works with the provided one from you , but it will crash with mine. EDIT: Figured out that #define GWIN_NEED_CONTAINERS TRUE was the reason for THAT problem with the demo just add it to the conf and it will freeze during init process Kind Regards cheater
  10. Sry, heres a smaller one mini.zip. Its the project Folder from my chibios workspace. In my previous upload i have my whole workspace with the gentle note that just the test.c file is relevant since i commented the the other stuff out from beeing build.
  11. Thx for your response Joel, its just the test.c file. <Download Link Removed>
  12. This Topic is closely related to my other topic: https://community.ugfx.io/topic/454-weird-behavior/ One of the problem is that i cant use the history function of the console. If it "exceeds the display" and it is not visibile it will crash. For this Topic i wanted to use your example from https://wiki.ugfx.io/index.php/Console to debug and show the strange behavior in an minimalistic example. But theres another big failure, because it didn't work . And thats strange, becouse i already use it, but in this example it cant even initialize. The Call GW1 = gwinConsoleCreate(0, &wi); will crash in gwin_wm.c _gwinWMAdd if (gh->parent && (!(gh->parent->flags & GWIN_FLG_CONTAINER) || gh->display != gh->parent->display)) and leads to _unhandled_exception (infinite loop) in vectors.c from chibios
  13. cheater

    Weird behavior

    push, please help me! if i use the gfileOpen function after a gwinShow call it wont work. the file discriptor gives me an error an the gwinShow will abort (probably it has something to to with the error from gfileopen)
  14. is there already a solution for this? im struggling with this too.
  15. cheater

    Weird behavior

    hi, ich added #define GFX_USE_OS_CHIBIOS TRUE and #define GFILE_MAX_GFILES 30 /* * Copyright (c) 2015 Joel Bodenmann aka Tectu <joel@unormal.org> * Copyright (c) 2015 Andrew Hannam aka inmarket * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the <organization> nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This program was originally contributed by community member "Fleck" as * the winning entry in the December 2014 demo competition. * * Some minor changes have been made by the uGFX maintainers. */ #include "calibration.h" #include "gui.h" #include "stm32f4xx.h" #include "tetris.h" #include "ch.h" #include "hal.h" #include "gfxconf.h" #define MY_AUDIO_CHANNEL 0 /* Use channel 0 */ #define MY_PLAY_FILE "test.mp3" static gdispImage myImage; GHandle ghImage1; font_t font; GFILE *f; char *errmsg; uint32_t toplay; uint32_t len; GDataBuffer *pd; static void createWidgets(void) { coord_t swidth, sheight; swidth = gdispGetWidth(); sheight = gdispGetHeight(); // Set up IO for our image gdispImageOpenFile(&myImage, "Logo klein.bmp"); gdispImageDraw(&myImage, 0, 0, swidth, sheight, 0, 0); gdispImageClose(&myImage); } /* * SDIO configuration. */ static const SDCConfig sdccfg = { 0 }; void Delay(long i); /* * This is a periodic thread that does absolutely nothing except flashing * a LED. */ static WORKING_AREA(waThread1, 2048); static msg_t AudioThread(void *arg){ if (!gfxBufferAlloc(16, 1024)) { errmsg = "Err: No Memory"; goto theend; } repeatplay: // Open the wave file if (!(f = gfileOpen(MY_PLAY_FILE, "r"))) { errmsg = "Err: Open MP3"; goto theend; } // Initialise the audio output device - bitrate is ignored if (!gaudioPlayInit(MY_AUDIO_CHANNEL, 22000, GAUDIO_PLAY_FORMAT_FILE)) { errmsg = "Err: Bad format/freq"; goto theend; } // Play the file gdispDrawString(0, gdispGetHeight()/2, "Playing...", font, Yellow); toplay = gfileGetSize(f); while(toplay) { // Get a buffer to put the data into pd = gfxBufferGet(TIME_INFINITE); // This should never fail as we are waiting forever // How much data can we put in len = toplay > pd->size ? pd->size : toplay; pd->len = len; toplay -= len; // Read the data if (gfileRead(f, pd+1, len) != len) { errmsg = "Err: Read fail"; goto theend; } gaudioPlay(pd); } gfileClose(f); // Wait for the play to finish gaudioPlayWait(TIME_INFINITE); gdispDrawString(0, gdispGetHeight()/2+10, "Done", font, Green); // Repeat the whole thing gfxSleepMilliseconds(1500); gdispClear(Black); goto repeatplay; // The end theend: if (errmsg) gdispDrawString(0, gdispGetHeight()/2, errmsg, font, Red); } static msg_t BlinkerThread(void *arg) { (void)arg; chRegSetThreadName("blinker"); palSetPadMode(GPIOC, 2, PAL_MODE_OUTPUT_PUSHPULL); while (TRUE) { palSetPad(GPIOC, 2); /* Orange. */ chThdSleepMilliseconds(500); palClearPad(GPIOC, 2); /* Orange. */ chThdSleepMilliseconds(500); } } int main(void) { gfxInit(); bool_t exitThread = FALSE; gaudioPlayInit(0,441000,GAUDIO_PLAY_FORMAT_FILE); gdispSetBacklight(100); gdispSetContrast(100); font = gdispOpenFont("*"); gwinSetDefaultFont(gdispOpenFont("UI2")); gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE); //tetrisInit(); /* */ //RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN; // Clock für Port D aktivieren //GPIOD->MODER = 0x55000000; // Pin 12..15 als Ausgang deklarieren /* palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); // CS. palSetPad(GPIOB, 11); palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); // CS. palSetPad(GPIOC, 11); palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST); // SCK. palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(5)); // MISO. palSetPadMode(GPIOB, 15, PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST); // MOSI. */ /*palSetPadMode(GPIOC, 8, PAL_STM32_ALTERNATE(12) | PAL_STM32_PUDR_PULLUP | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); //DAT0 palSetPadMode(GPIOC, 9, PAL_STM32_ALTERNATE(12) | PAL_STM32_PUDR_PULLUP | PAL_STM32_OTYPE_PUSHPULL); //DAT1 palSetPadMode(GPIOC, 10,PAL_STM32_ALTERNATE(12) | PAL_STM32_PUDR_PULLUP | PAL_STM32_OTYPE_PUSHPULL); //DAT2 palSetPadMode(GPIOC, 11,PAL_STM32_ALTERNATE(12) | PAL_STM32_PUDR_PULLUP | PAL_STM32_OTYPE_PUSHPULL); //DAT3 palSetPadMode(GPIOC, 12,PAL_STM32_ALTERNATE(12) | PAL_STM32_OSPEED_MID2 | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); //CLK palSetPadMode(GPIOD, 2, PAL_STM32_ALTERNATE(12) | PAL_STM32_PUDR_PULLUP | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); //CMD*/ sdcObjectInit(&SDCD1); sdcStart(&SDCD1, &sdccfg); sdcConnect(&SDCD1); //createWidgets(); gfxThreadCreate(NULL, 1024, NORMAL_PRIORITY, AudioThread, (void*)&exitThread); geventListenerInit(&glistener); gwinAttachListener(&glistener); guiCreate(); //mmcObjectInit(&MMCD1); //mmcStart(&MMCD1, &mmccfg); // Allocate audio buffers - 4 x 512 byte buffers. // You may need to increase this for slower cpu's. // You may be able to decrease this for low latency operating systems. while (1) { gfxSleepMilliseconds(500); guiEventLoop(); } /*while (TRUE) { // Start a new game // Will return when game is over tetrisStart(); gfxSleepMilliseconds(10000); GPIOD->BSRR=0; GPIOD->BSRRH = 0x0000F000; // Alle LED's aus Delay(1000000); GPIOD->BSRRL = 0x0001000; // LED 1 ein Delay(1000000); GPIOD->BSRRL = 0x0002000; // LED 2 ein Delay(1000000); GPIOD->BSRRL = 0x0004000; // LED 3 ein Delay(1000000); GPIOD->BSRRL = 0x0008000; // LED 4 ein Delay(1000000); }*/ } // Delay für Verzögerungen void Delay(long i) { volatile long iZ = i; while (iZ--); } my main file looks like the following now, but the error is still there on gFileOpen i recognized the next strange thing, all demos run a way slower than in your videos: https://youtu.be/mmRZkh_GtEI and there as no code from me, simply the demo from you! kind regards cheater
  16. cheater

    Weird behavior

    i increased the value, it didn't changed anything
  17. cheater

    Weird behavior

    the error occurs when gfileOpen(MY_PLAY_FILE, "r"))) is called. but only if createwidget is called. the audio module runs without it it must have something todo with the gwinImageOpenFile call, after that i cant open it kind regards cheater
  18. cheater

    Weird behavior

    cant edit a 2nd time. i found this http://wiki.ugfx.org/index.php/Images#A_word_about_close.28.29 the example did not implement this.
  19. cheater

    Weird behavior

    #include "gfx.h" #include "stm32f4xx.h" #include "tetris.h" #include "ch.h" #include "hal.h" #include "gfxconf.h" #define MY_AUDIO_CHANNEL 0 /* Use channel 0 */ #define MY_PLAY_FILE "test.mp3" GHandle ghImage1; font_t font; GFILE *f; char *errmsg; uint32_t toplay; uint32_t len; GDataBuffer *pd; static void createWidgets(void) { GWidgetInit wi; // Apply some default values for GWIN gwinWidgetClearInit(&wi); wi.g.show = TRUE; // create the first image widget wi.g.x = 10; wi.g.y = 10; wi.g.width = 420; wi.g.height = 280; ghImage1 = gwinImageCreate(0, &wi.g); gwinImageOpenFile(ghImage1, "panda.bmp"); } /* * SDIO configuration. */ static const SDCConfig sdccfg = { 0 }; void Delay(long i); /* * This is a periodic thread that does absolutely nothing except flashing * a LED. */ static WORKING_AREA(waThread1, 2048); static msg_t AudioThread(void *arg){ if (!gfxBufferAlloc(4, 512)) { errmsg = "Err: No Memory"; goto theend; } repeatplay: // Open the wave file if (!(f = gfileOpen(MY_PLAY_FILE, "r"))) { errmsg = "Err: Open MP3"; goto theend; } // Initialise the audio output device - bitrate is ignored if (!gaudioPlayInit(MY_AUDIO_CHANNEL, 22000, GAUDIO_PLAY_FORMAT_FILE)) { errmsg = "Err: Bad format/freq"; goto theend; } // Play the file gdispDrawString(0, gdispGetHeight()/2, "Playing...", font, Yellow); toplay = gfileGetSize(f); while(toplay) { // Get a buffer to put the data into pd = gfxBufferGet(TIME_INFINITE); // This should never fail as we are waiting forever // How much data can we put in len = toplay > pd->size ? pd->size : toplay; pd->len = len; toplay -= len; // Read the data if (gfileRead(f, pd+1, len) != len) { errmsg = "Err: Read fail"; goto theend; } gaudioPlay(pd); } gfileClose(f); // Wait for the play to finish gaudioPlayWait(TIME_INFINITE); gdispDrawString(0, gdispGetHeight()/2+10, "Done", font, Green); // Repeat the whole thing gfxSleepMilliseconds(1500); gdispClear(Black); goto repeatplay; // The end theend: if (errmsg) gdispDrawString(0, gdispGetHeight()/2, errmsg, font, Red); } static msg_t BlinkerThread(void *arg) { (void)arg; chRegSetThreadName("blinker"); palSetPadMode(GPIOC, 2, PAL_MODE_OUTPUT_PUSHPULL); while (TRUE) { palSetPad(GPIOC, 2); /* Orange. */ chThdSleepMilliseconds(500); palClearPad(GPIOC, 2); /* Orange. */ chThdSleepMilliseconds(500); } } int main(void) { bool_t exitThread = FALSE; halInit(); chSysInit(); gaudioPlayInit(0,441000,GAUDIO_PLAY_FORMAT_FILE); gfxInit(); font = gdispOpenFont("*"); gwinSetDefaultFont(gdispOpenFont("UI2")); gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE); sdcObjectInit(&SDCD1); sdcStart(&SDCD1, &sdccfg); sdcConnect(&SDCD1); createWidgets(); gfxThreadCreate(NULL, 4096*10, NORMAL_PRIORITY, AudioThread, (void*)&exitThread); while(TRUE) gfxSleepMilliseconds(1000); Hi, i can call either create Widgets or gfxThreadcreate, but when i use both nothing or something random is happening, sometimes just a scratchy sound, sometimes a part of the picture is visible. These are snippets of some example code of ugfx.
  20. Hi Joel, if #define GFX_USE_GTIMER TRUE is missing, i got the error just out of the box. But i have another Problem now, i cant access the sd-card. I added #define GFILE_NEED_FATFS TRUE but then i get this: any hints for me? kind regards cheater
  21. Ok, the demo compiles, i had to add GFX_USE_GTIMER to the gfxconf.
×
×
  • Create New...