MVP-8400 Dyanamic Imaging Refresh / Update
jjames
Posts: 2,908
Ok, here's the scenario - Like everyone else - I'm pulling in a doppler radar, and animating it. The problem is, that some of the dynamic images do not upate in time, or aren't refreshed fast enough. Is there a way for the panel to tell me that all the dynamic images are ready and have been loaded? With a series of 7 or 8 images and it's always looping, having 3 or 4 of the images loaded makes it appear to flicker or flash to the user.
It's usually not a terrible issue, but I try to practice the art of CYA.
It's usually not a terrible issue, but I try to practice the art of CYA.
0
Comments
I've been trying the same thing and can't get anything close to what I want. I thought I had it when I changed to refresh rate in the resource manager to 0 and check the box to refresh only at start up. I would then force a refresh when page tracking (tp buffer) saw PAGE-Weather I would send the command to refresh the 8 dynamic images so by time a user got around to pushing the view radar button the images would be fresh.
It didn't take long to realize that trying to animate with dynamic images that would have to refresh when called would just take to long so I figured the above work around would basically make it a plain file image and not need to go to the url and pull a fresh image.
Still didn't work right. Still a blank time in between images. I then loaded the images into icon slots thinking maybe pulling from the dynamic library is just slow but that didn't work (used code to change icon).
I'm now thinking the file is to large to be drawn quickly, the images are 50kb each and I have perfectly running animations but they are 15.5kb each, so maybe the radar images are to big.
But why and how does picture frame load a new image witht out a blank space in between?
There's got to be way but I tried animation from the TP, from code usinf ^ani commands, through code changing icons slot, even tried multi state levels and got no where.
If any ones got this or any medium size animation working smootly I'd like to hear how.
SEND_COMMAND dvTPCV7,"'^RFR-RadarUptonNY_7'"
joeyjoejo- I've included the applicable TPD4 files which is as I left after my last failed attempt. This version uses multi-bar graph range low = 1 and high = 8 macthing number of images and I was changing images via code and also in theis version I tried just pulling in from icon slot to see if that made a difference. I original did the standard multi state general with various up and down time, etc, etc. but they didn't work. In the VAV pop up I have one animatioin and in the MediaBG page I have two animations (paddle fan and stick figure) which work fine. In the MediaBG I also have animated lighting but I use changes in opacity values to match existing lighing level which works pretty good. So I tried to match existing known working methods but to no avail.
The radar images are I believe 600 x 480 and 50kbps, so are they to big? I don't know but I wouldn't think so.
If you could make an animation work with the URL listed in the resource manager RadarUptonNY_0 - 7 I'd be very curious to find out how. I'm a newbie and I quite often miss the obvious but I tried everything everything I could think of.
Thanks for your inputs!
Again, just a thought and I'm welcoming anyone to shoot it down.
I would love to know if that's something worth attempting before trying cuz my gut instinct says no way. But what do I know.
The point you made regarding the action on dynamic image being dynamic which means (I believe) when invoked it has to go to it's url and download an up to date image. Then refresh at what ever rate you set for it. Which is why (I believe) if you take the approach I tried and set refresh to 0 and only refresh at start up means (I believe) that it will just pull the image on file and not attemp to go to the URL and refresh,, there by eliminating all the IP/downloading stuff. Which if true is cool then we can dictate when to refresh using the '^RFR-dynamic_image' command to force a refresh at our convenience which would be slightly before invoking the animation. In theory I think it sounds good but I could be off my rocker.
Maybe joeyjoejo or some one else could shed some light on whether these assumptions are true or not.
But regardless of the downloading/refresh thing I've also tried using static images just to eliminate all that crap and still couldn't pull if off, which is why I'm thinking what my wife says is true, size does matter!
Right now I'm hoping joeyjoejo will give some insight to help me to determine whether or not to take this idea off the shelf and try some more.
I agree with Jeremiah that a memory upgrade may be in order. I was told by a reliable source that once you try to animate anything (multi-state buttons or other animations including sliding popups and such) over 100,000 pixels you won?t get the smooth results you expect. At 600x480 you are almost 3x over the 100K limit (if that is indeed the actual limit, I can?t confirm that number as fact ? but there is a limit which is dependent on the memory in the panel)
You can write whatever you want to write to the flash drive as long as space is available. I had an app where I needed to display pictures from the web that were only available in .gif format (daily cartoons). So I wrote a module that passed the URL of each pic to a php scipt on my server and the scipt retrieved the .gif, converted it to a .png, and returned it back to the module which then in turn stored it on the flash drive. When the user wanted to view the pics I did a refresh on a dynamic image which retrieved the pics from the flash drive.
And yes, a refresh rate of 0 means that the resource is only downloaded once.
I like the fact that I can ead and write whatever to RAM which gives me something else to learn as I have not yet played with read_file, writ_file, etc, commands.
A while ago I did want to attempt using AMX with PHP as I have source code in PHP scipt that can interface with winamp, another SourceForge 'GetID3' script that I modified to work with MySQL so I been very interrested in that possibility.
Do you have an example of how your PHP interface worked so I can get an idea how to begin the process. I don't need your whole script but just a little direction.
Thanks
The work that PHP does is on the server side and is totally transparent to AMX. To find out everything you ever wanted to know about PHP visit:
http://www.php.net/
For my money, PHP is the most powerful scripting language for the web.
It was alot of fun but I got hung up on trying to make sticky check boxes with javascript and cookies, Session IDs and then resolving ip addresses to city and state. And none of it had any purpose other than my own amusement and curiosity. There's alot that can be done with PHP, but as I'm not a real programmer or at least not a full time programmer with years of experience, doing my programming at nights and on weekends, I just don't have time to do everything I'd like to and play with all this stuff. But when I get a chance I think I'd like to play with PHP some more.