LCDInfo.com http://forum.lcdinfo.com/ |
|
Refresh http://forum.lcdinfo.com/viewtopic.php?f=17&t=440 |
Page 1 of 1 |
Author: | rudi Grobler [ Fri Dec 05, 2003 9:57 ] |
Post subject: | Refresh |
How do I create a plugin image and force it to be refreshed/redrawn every let's say, 500ms??? |
Author: | DarkElf [ Fri Dec 05, 2003 11:02 ] |
Post subject: | |
:| excuse me if i'm wrong but this feature is already done! their: <item type="pluginimage" x="50" y="8"> <imageid>image_test</imageid> <refresh>100</refresh> </item> the refresh params will reload you picture every 100ms, you want 500ms? replace 100 by 500 after your plugin must be able to remake the picture each time lcdinfo will ask for. Henri know (a lot) better than me this |
Author: | rudi Grobler [ Fri Dec 05, 2003 11:15 ] |
Post subject: | |
Quote: he refresh params will reload you picture every 100ms, you want 500ms? replace 100 by 500 after if your plugin must be able to remake the picture each time lcdinfo will ask for. I figured that but i dont know inside the Data object, which function is called on the refresh?[/quote] |
Author: | rudi Grobler [ Fri Dec 05, 2003 11:46 ] |
Post subject: | |
Agggghhh stupid me... I now only relize that it just calls virtual LCDBitmap* __stdcall getImage(int imageNo) each time it needs to refresh!!! I was playing round with the virtual void __stdcall updateData(void) function |
Author: | Henri [ Fri Dec 05, 2003 11:50 ] |
Post subject: | |
It's only the getImage() function that is called in which you first update the image and then return the pointer to the image. LCDInfo then checks if the image data has changed and updates it to lcd if needed. I think you have the winamp2 plugin source where you could look for some example how the getImage() works ? EDIT: You figured it out I now decided to strip the updateData() completely out of the interface until there comes use for it so it doesn't cause mixups anymore. |
Author: | rudi Grobler [ Fri Dec 05, 2003 11:57 ] |
Post subject: | |
Quote: It's only the getImage() function that is called in which you first update the image and then return the pointer to the image. LCDInfo then checks if the image data has changed and updates it to lcd if needed.
Are you sure about this... I update my line graph plugin in the getimage part... this seems to happen each time the set refresh rate happens because I can slow this down or speed it up!!! |
Author: | Henri [ Fri Dec 05, 2003 12:13 ] |
Post subject: | |
Maybe I wasn't very clear on my words. You can set the refresh interval in the screen definition file. Then getImage() is called using that interval and if the data returned by getImage() is different than it was last time getImage() was called then the new data is written to the lcd. So it should work like you described. EDIT: And I'll also move this into the Plugin SDK forum as that's mostly what this topic is about. |
Author: | rudi Grobler [ Fri Dec 05, 2003 12:59 ] |
Post subject: | |
Sorry , after a second look I only caught what you were trying to say!!! I am still learning were to post what, will try to get it right... |
Author: | rudi Grobler [ Sat Dec 06, 2003 12:52 ] |
Post subject: | |
Please also just check one thing in the code I send you... on the single border draw function I defined the bmp to be eg. 64 x 32 but I had to draw the border (0,0,63,32) Width - 1 / Height - 1 else it doesn't display correctly??? Any thoughts... |
Author: | Henri [ Sat Dec 06, 2003 17:48 ] |
Post subject: | |
I'll check this. For 64x32 bitmap the correct coordinates for border would be 0,0,63,31 I think. 0 to 63 = 64 pixels and 0 to 31 = 32 pixels. |
Author: | rudi Grobler [ Sat Dec 06, 2003 18:49 ] |
Post subject: | |
aaaaaghh, makes sense now Any other suggestions to improve??? |
Author: | Henri [ Mon Dec 08, 2003 1:13 ] |
Post subject: | |
I started implementing your class as the graph item. Simple graphing already works and next time I'll continue with it... |
Page 1 of 1 | All times are UTC + 2 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |