TripMate initialization DigitalMod
I have an old Delorme TripMate serial GPS that I'm using for the time being. These old TripMates are a little strange. When they turn on, they do nothing but repeat the word "ASTRAL" over the serial connection until they get a reply of "ASTRAL\r\n". Once initialized, they send full nmea compliant transmissions.
I can currently get this GPS to work work with StreetDeck by using a piece of software to split the com port to two virtual com ports, then connecting with hyperterminal on one of the com ports and typing in "ASTRAL", then starting StreetDeck and connecting on the other com port.
This is a pain in the butt, so I decided I'd whip up a DigitalMod to make it simpler. So far, I've created a COM object that connects to the serial port you pass it, outputs "ASTRAL\r\n" and closes the port. I then added a new module with a single button that calls that function when you push the button. It works sometimes. I think it's an issue with my serial communication code...I'll fix that later.
Please be patient with me...this is my first attempt at a DigitalMod and I may be asking ignorant questions.
My questions are:
1. Is there somewhere I can tie into the StreetDeck so that I can run this code on startup or when the GPS initializes rather than having to open the Module and push the button? The only other issue is that when the serial connection closes, it reverts back to "ASTRAL" mode, so I'd have to send the initalization string and keep the port open and pass it to the GPS module. I can get around this with my virtual serial port software, but it'd be nice if I didn't have to.
2. Where is the setting stored for the Com port that's chosen in the StreetDeck Configuration? I checked the config.xml file and it doesn't seem to be there. If it's not stored in something standard like an xml file or a registry key, how do I read it in?
That's it for now. Thanks.