Jacks October 12, 2022 at 2:02 am
- This topic was modified 1 year, 1 month ago by Jacks.
There is SM200C, we need to receive NMEA messages. Now the SMGetGPSInfo function returns the coordinates and height, respectively, the gps works. But there is no data in the NMEA messages, i.e. the array is not filled, although the size is clearly changing.
What could be the problem?
We think that problems can be of the following type:
1. NMEA messages are disabled by default. And then they need to be turned on. How?
2. Some problems with api. We use C#, and everything is done according to the examples from C++, and before that there were no problems.
JacksParticipantJacks October 12, 2022 at 3:05 am
Answer to my question.
This was a bad example for C# in API. More precisely, the wrong import of the library. Correct like this:
[DllImport(DLL_NAME_Win32, EntryPoint = “smGetGPSInfo”, CallingConvention = CallingConvention.Cdecl)]
private static extern SmStatus smGetGPSInfo_Win32(int device, SmBool refresh,
ref SmBool updated, ref long secSinceEpoch, ref double latitude,
ref double longitude, ref double altitude, [Out] char nmea, ref int nmeaLen);
You must be logged in to reply to this topic.