ASCOM driver problem, and the fix


thargitai01@...
 

Hi Jerry and everyone!

I've bought an EXOS-2 PMC-eight, and it just arrived. Great mount, I hope i can try it under the sky soon. :)
Now i'm trying to set up my gear.
Because I'm planning to use this mount mostly with ASCOM driver, i've tried the provided one and i've found a problem. I'm a developer architect (and working with .NET since 2003) so i've started to find out what happened. :)
When the ASCOM driver properties dialog opens first time, it creates the ascom profile with default values.
And there is a little problem.
I'm living in Hungary, our decimal separator is "," not "." as in the US or UK, so a FormatException occurs.
I've fixed the default profile settings from number to number, and now the driver works.
Then I've installed the driver with the source codes, to try to fix this problem at source level.
Here's the fixed parts, in Driver.vb:
    Friend Shared ApertureDiameterDefault As String = Convert.ToString(0.102)
    Friend Shared ApertureAreaDefault As String = Convert.ToString(0.00817)
    Friend Shared FocalLengthDefault As String = Convert.ToString(0.7)
    Friend Shared SiteElevationDefault As String = Convert.ToString(403.0)
    Friend Shared SiteLatitudeDefault As String = Convert.ToString(36.18063)
    Friend Shared SiteLongitudeDefault As String = Convert.ToString(-94.18838)
    Friend Shared RateOffsetDefalut As String = Convert.ToString(0.023)
    Friend Shared SiteAmbientTemperatureDefault As String = Convert.ToString(59.0)
    Friend Shared RA_SiderealRateFractionDefault As String = Convert.ToString(0.4)
    Friend Shared DEC_SiderealRateFractionDefault As String = Convert.ToString(0.4)
(these default values are declared as strings in the original source, and Convert.ToString() uses the current culture setting, so it'll work with every decimal separator setting)

Jerry, i think this small change in the driver could be useful for some users with non-US/UK localization setting. What do you think?

Best regards,
Tamas Hargitai


Join MAIN@ESPMC-Eight.groups.io to automatically receive all group messages.