Text feedback
BCalderwood
Posts: 35
When I went to RMS training, a fellow student was wondering if there was a way to get text that was populated in a text field on a touch panel back from the touch panel for comparison. Example, say you're using a request module, the module will send song info, title, etc to various text boxes on the panel. Once that text box is populated, can you find out by coding what text is populating the text box after it's been sent? Obviously, a good programmer will have a structure or other variable arrays to keep/manage this information before sending out to a panel. In using a module, most of the time you don't have the luxury of looking at the comm portion of the module to see how this information is being sent. Or say you are new to the project and you just want to find out what text is in a particular variable text box at any given time.
My understanding is that there really isn't a way to "leech" the text back from the panel once it's been sent. You can use a virtual device to capture any messages between the module and the panel and then re-route or manage differently which imo would be the best way. Any thoughts?
My understanding is that there really isn't a way to "leech" the text back from the panel once it's been sent. You can use a virtual device to capture any messages between the module and the panel and then re-route or manage differently which imo would be the best way. Any thoughts?
0
Comments
The best way to track what was sent is as you said to create a structure or array and just refer to that for comparisions. The issues you pose with locked modules is another reason most of us don't like using them but VT to the panels is usually in the open UI module. I guess if it wasn't you could as you suggest track the strings yourself by passing the module a virtuall device instead of the real device so you could intercept and route the modules device string yourself but writing your own module wouldn't be much more difficult and a heck of alot cleaner.
You have the option to use CUSTOM_EVENTs to extract some of the current button properties including the button text. Aside from the text you can also grab properties such as the current bitmap name, icon name, font, and colors to name a few.
I attached some CUSTOM_EVENT sample code. It?s not my code and I don?t remember where it originated but I think I got it from the forum.
Of course, this is probably a bad example since you need a man in the middle with the MAX anyway to prevent it from spawning its popups all over your main interface. But you get the point.
Jeff
1- I didn't know
2- There was one situation with the early version of a Sirius module where it wasn't updating text feedback often enough and I could tell the module to send again. I was thinking of ways to just send it conditionally and more of a stop gap solution. By the time I got around to working on it, another version of the module came out that fixed the problem. After hearing about it in RMS class and running into a situation where I could have used it made me wonder even more if it was possible. Now, I know it is.
It's like you know there is candy in your cupboard but you can't find it. It nags you until you figure the mystery out. LOL Anyways....
The custom event only fires after a query. Make sure you set the address code correctly.
I've tried to use it on a project, but found out it didn't update fast enough. I wanted to query 8 text boxes shortly after each other, but got in some problems doing so...