Thimo Koolen Posted July 23, 2016 at 05:02 PM Posted July 23, 2016 at 05:02 PM Hello everyone, I'm working on the abandoned EHAM Gateplanner plugin for the EHAM controllers. The API is going fine and some things need to be done (async webserver requests) in the plugin as well. At the moment I'm trying to get the custom data tag to work. Here is the current code in the Dev branch: https://github.com/tyrope/EHAM-gateplanner-EuroScope/tree/Dev Main file is GatePlannerPlugIn.cpp. The data tag is [Mod - Happy Thoughts]igned (lines 24 and 129). However, it seems the OnGetTagItem-method isn't working properly. The 'ping' message for debug purposes is never showing up, so the string is probably never changed as well. Does anybody know what's wrong with the code? ACCNL4 (Training Director) - Dutch VACC Link to comment Share on other sites More sharing options...
Thimo Koolen Posted July 23, 2016 at 07:40 PM Author Posted July 23, 2016 at 07:40 PM I tried some more things and found that the problem probably is with this part: if(!FlightPlan.IsValid()) { return; } If I have a test String above it: strcpy_s(sItemString, 4, "AA"); It works. But after that, it doesn't. So the flightplan check doesn't work. Anyone has an idea why not? ACCNL4 (Training Director) - Dutch VACC Link to comment Share on other sites More sharing options...
Thimo Koolen Posted July 31, 2016 at 10:33 AM Author Posted July 31, 2016 at 10:33 AM Does anyone have an idea as of why it doesn't work? ACCNL4 (Training Director) - Dutch VACC Link to comment Share on other sites More sharing options...
Gergely Csernak Posted August 7, 2016 at 12:53 PM Posted August 7, 2016 at 12:53 PM The code for IsValid looks like this: inline bool IsValid ( void ) const { return m_FpPosition != NULL ; } ; So it can return false only if you did not get a FP from the system. Gergely. EuroScope developer Link to comment Share on other sites More sharing options...
Thimo Koolen Posted August 7, 2016 at 06:23 PM Author Posted August 7, 2016 at 06:23 PM I guess it returns the false value for every plane, also the ones with a flight plan. The test-string (BB) works if I add it the line before the if-statement, but if it's the first thing in the if-statement, it won't work. So it never sends a 'correct' flightplan it seems. A silly question maybe, but does it matter that I'm logged in as observer and not as a real controller? I think it wouldn't matter, but who knows... Maybe the IsValid only works for controllers? ACCNL4 (Training Director) - Dutch VACC Link to comment Share on other sites More sharing options...
Gergely Csernak Posted August 7, 2016 at 07:07 PM Posted August 7, 2016 at 07:07 PM It should work for observer as well. IsValid checks if the internal structure is correct and not if the FP itself is valid. Gergely. EuroScope developer Link to comment Share on other sites More sharing options...
Thimo Koolen Posted August 7, 2016 at 07:23 PM Author Posted August 7, 2016 at 07:23 PM Do you have any clue as of why the statement won't work? If I put the strcpy_s just before the if-statement, it works fine. It doesn't inside the if-statement like on the image above. ACCNL4 (Training Director) - Dutch VACC Link to comment Share on other sites More sharing options...
Gergely Csernak Posted August 7, 2016 at 07:29 PM Posted August 7, 2016 at 07:29 PM Do not expect FlightPlan and RadarTarget be valid at the same time. If they are not correlated then OnGetTagItem may p[Mod - Happy Thoughts] only one of them. Gergely. EuroScope developer Link to comment Share on other sites More sharing options...
Thimo Koolen Posted August 7, 2016 at 07:33 PM Author Posted August 7, 2016 at 07:33 PM So far I'm only testing the Ground S Mode radar tags. What would I need to change for that? ACCNL4 (Training Director) - Dutch VACC Link to comment Share on other sites More sharing options...
Thimo Koolen Posted August 10, 2016 at 11:21 AM Author Posted August 10, 2016 at 11:21 AM Thanks for the hint Gergely, the RadarTarget variable works! Now I have to get an async network thread. Now Euroscope freezes all the time. ACCNL4 (Training Director) - Dutch VACC Link to comment Share on other sites More sharing options...
Gray Taylor 1041931 Posted October 9, 2016 at 03:56 AM Posted October 9, 2016 at 03:56 AM So I'm a little too exhausted to read through this entire thread, BUT, if it's worth anything, I was able to fashion our custom Data TAGs simply by modifying the EuroScope Font (TTF) file. Link to comment Share on other sites More sharing options...
Recommended Posts