Touchpanel executes commands out of order
mpullin
Posts: 949
Okay so I have the following three commands in a button_event, firing one after the other.
I can think of two possible scenarios:
1) the touchpanel, a modero 8400 in both cases, failed to execute line B due to an ICSP packet drop. So the video_bg popup was never popped up.
2) the touchpanel got packets A, B, and C, but executed them out of order. It popped up the video_bg, then cleared all popups, then popped up the source popup. Both the commands getting swapped are very short. Maybe ICSP has timestamps on the packets that are only accurate to a 10th of a second, and when it gets packets that are sent within the same 10th of a second, it just guesses.
Scenario 2 seems more plausible to me (despite Occam's Razor) so I plan to add a meaningless command ('WAKE') in between lines A and B. (I would just use waits but that gets complicated due to the stack variable) That way adjacent commands switching is no longer a concern.
Also, everything in this post is a guess, I don't have any inside knowledge of how ICSP works. Does anyone here have experience with commands to TPs being switched? If so, what did you do?
SEND_COMMAND BUTTON.INPUT.DEVICE, '@PPX'; // line A. Clears any popups that might be around from other stuff SEND_COMMAND BUTTON.INPUT.DEVICE, 'PPON-VIDEO_BG'; // line B. Shows the background for video SEND_COMMAND BUTTON.INPUT.DEVICE, "'PPON-VIDEO_SRC_',cSomeStackVariable"; // line C. Shows whatever specific device page99.9% of the time this code acts as expected. But there have been 2 reported cases, 1 of which was confirmed by me, that sometimes the button pops up the device popup without the video_bg popup. It looks ugly.
I can think of two possible scenarios:
1) the touchpanel, a modero 8400 in both cases, failed to execute line B due to an ICSP packet drop. So the video_bg popup was never popped up.
2) the touchpanel got packets A, B, and C, but executed them out of order. It popped up the video_bg, then cleared all popups, then popped up the source popup. Both the commands getting swapped are very short. Maybe ICSP has timestamps on the packets that are only accurate to a 10th of a second, and when it gets packets that are sent within the same 10th of a second, it just guesses.
Scenario 2 seems more plausible to me (despite Occam's Razor) so I plan to add a meaningless command ('WAKE') in between lines A and B. (I would just use waits but that gets complicated due to the stack variable) That way adjacent commands switching is no longer a concern.
Also, everything in this post is a guess, I don't have any inside knowledge of how ICSP works. Does anyone here have experience with commands to TPs being switched? If so, what did you do?
0
Comments
--John
I've never seen this. I have sometimes thought I did, but it was always traced back to something. I use the @PPN command rather than PPON, but I am not sure that would make any difference. You could try it. You can also turn on page tracking and capture what the panel is doing and see if it is executing the commands in the correct order. Another thing you could do is combine the two popups into one and just call it.
Paul
I think that is what you are seeing. The commands are executing in order, but the rendering of the pop up is delayed when it has to load its images into the cache ... just enough for it display after the one that was called before. That would also explain the inconsistencies .. the state of the cached images.
This is indeed the case. I don't use pages myself and have found that the popups will appear in inverse proportion to their graphic complexity. All of my popus use some kind of show and hide animation. You can see anomalies(sp?) when the delay time of that animation is high.
Is your case graphic intensive Matt? I wonder if a short wait between your SEND_COMMANDS would work.
I'll try that too and then write a function to queue the pop up commands to the panel if it works.
--John
The second popup is more graphically intensive than the first. Basically the first popup has some bitmaps, and volume controls on the side. The second popup is source control for whatever source the room is on. The problem is not that the two popups come up out of order, it's that I think the PPX command is being executed after the first popup comes up. The two popups are not in the same group, so if they both were issued they would both appear.
I stuck a WAKE command after the PPX command just to buy a teeny bit of time. If that doesn't work I will need to build a queue like you did. (again, can't just use a wait because I need to use a stack variable in the 3rd command)