As I understand it, eMesg.GetRiderPosition() is supposed to return RiderPositionType enum.
When I call the function
EventMesg eMesg = (EventMesg)e.mesg;
RiderPositionType? positiontype= eMesg.GetRiderPosition();
I'm getting the error
'Specified cast is not valid.'
This exception was originally thrown at this call stack:
Dynastream.Fit.EventMesg.GetRiderPosition() in EventMesg.cs
Garmin21._126ConsoleApp.FitImport.FITExtract.MesgBroadcaster_EventMesgEvent(object, Dynastream.Fit.MesgEventArgs) in FITExtract.cs
Dynastream.Fit.MesgBroadcaster.OnMesg(object, Dynastream.Fit.MesgEventArgs) in MesgBroadcaster.cs
Dynastream.Fit.Decode.RaiseMesgEvent(Dynastream.Fit.Mesg) in Decode.cs
Dynastream.Fit.Decode.DecodeNextMessage(System.IO.Stream) in Decode.cs
Dynastream.Fit.Decode.Read(System.IO.Stream, Dynastream.Fit.DecodeMode) in Decode.cs
Dynastream.Fit.Decode.Read(System.IO.Stream) in Decode.cs
Garmin21._126ConsoleApp.FitImport.FITExtract.DecodeFitFile() in FITExtract.cs
Any help would be appreciated.