Skip to content

Commit b51091e

Browse files
OATControl V0.9.9.0- Updates
- Made OAT exit serial control mode on Disconnect - Fixed an issue when the locale OATControl was running in used a character other than '.' for decimal place in floating point numbers.
1 parent 49a16f6 commit b51091e

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Software/OpenAstroTracker ASCOM/OATCommuncations.WPF/CommunicationHandlers/SerialCommunicationHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public void Disconnect()
111111
{
112112
if (_port.IsOpen)
113113
{
114+
_port.Write(":Qq#");
114115
_port.Close();
115116
_port = null;
116117
}

Software/OpenAstroTracker ASCOM/OATControl/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("0.9.8.0")]
54+
[assembly: AssemblyVersion("0.9.9.0")]
5555
[assembly: AssemblyFileVersion("1.0.0.0")]

Software/OpenAstroTracker ASCOM/OATControl/ViewModels/MountVM.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics;
4+
using System.Globalization;
45
using System.IO;
56
using System.Linq;
67
using System.Reflection;
@@ -56,7 +57,7 @@ public class MountVM : ViewModelBase
5657
string _scopeName = string.Empty;
5758
string _mountStatus = string.Empty;
5859
string _currentHA = string.Empty;
59-
60+
CultureInfo _oatCulture = new CultureInfo("en-US");
6061
Util _util;
6162
ASCOM.Astrometry.Transform.Transform _transform;
6263

@@ -447,7 +448,7 @@ private async void OnConnectToTelescope()
447448
OnPropertyChanged("DECStepsPerDegree");
448449

449450
steps = await RunCustomOATCommandAsync(string.Format(":XGS#,#"));
450-
SpeedCalibrationFactor = float.Parse(steps);
451+
SpeedCalibrationFactor = float.Parse(steps, _oatCulture);
451452

452453
await ReadHA();
453454
MountConnected = true;
@@ -757,7 +758,7 @@ public double SpeedCalibrationFactor
757758

758759
private void OnSpeedFactorChanged(double oldVal, double newVal)
759760
{
760-
Task.Run(async () => await RunCustomOATCommandAsync(string.Format(":XSS{0:0.0000}#", newVal)));
761+
Task.Run(async () => await RunCustomOATCommandAsync(string.Format(_oatCulture, ":XSS{0:0.0000}#", newVal)));
761762
}
762763

763764
/// <summary>
@@ -1023,8 +1024,8 @@ private async Task OnFineSlewTimer(object s, EventArgs e)
10231024

10241025
if (doUpdate)
10251026
{
1026-
var ras = string.Format(":XSX{0:0.000000}#", raSpeed);
1027-
var decs = string.Format(":XSY{0:0.000000}#", decSpeed);
1027+
var ras = string.Format(_oatCulture, ":XSX{0:0.000000}#", raSpeed);
1028+
var decs = string.Format(_oatCulture, ":XSY{0:0.000000}#", decSpeed);
10281029
await RunCustomOATCommandAsync(ras);
10291030
await RunCustomOATCommandAsync(decs);
10301031
}

0 commit comments

Comments
 (0)