diff --git a/OATCommunications/CommunicationHandlers/TcpCommunicationHandler.cs b/OATCommunications/CommunicationHandlers/TcpCommunicationHandler.cs
index ce54515..e0bf371 100644
--- a/OATCommunications/CommunicationHandlers/TcpCommunicationHandler.cs
+++ b/OATCommunications/CommunicationHandlers/TcpCommunicationHandler.cs
@@ -3,9 +3,10 @@
using System.Net;
using System.Net.Sockets;
using System.Text;
+using System.Threading;
namespace OATCommunications.CommunicationHandlers
-{
+{
public class TcpCommunicationHandler : CommunicationHandler
{
private IPAddress _ip;
@@ -50,7 +51,7 @@ public TcpCommunicationHandler(IPAddress ip, int port)
}
protected override void RunJob(Job job)
- {
+ {
if (_client == null)
{
Log.WriteLine($"TCP: Configuration error, IP [{_ip}] or port [{_port}] is invalid.");
@@ -147,11 +148,21 @@ public override bool Connected
public override void Disconnect()
{
- if (_client != null && _client.Connected)
+ if (_client != null)
{
+ Log.WriteLine("TCP: Stopping Jobs processor.");
+ StopJobsProcessor();
+
+ Log.WriteLine("TCP: Port is open, sending shutdown command [:Qq#]");
+ ManualResetEvent waitQuit = new ManualResetEvent(false);
+ var quitJob = new Job(":Qq#", ResponseType.NoResponse, (s) => { waitQuit.Set(); });
+ RunJob(quitJob);
+ waitQuit.WaitOne();
+
Log.WriteLine("TCP: Closing port.");
_client.Close();
_client = null;
+ Log.WriteLine("TCP: Disconnected...");
}
}
}
diff --git a/OATControl/DlgChooseOat.xaml.cs b/OATControl/DlgChooseOat.xaml.cs
index a9ff910..b257919 100644
--- a/OATControl/DlgChooseOat.xaml.cs
+++ b/OATControl/DlgChooseOat.xaml.cs
@@ -426,6 +426,19 @@ private async void ProcessStateMachine(object sender, EventArgs e)
{
ShowManualLocation = true;
CurrentStep = Steps.ConfirmLocation;
+ // Let's get teh coordinate stored on the OAT
+ var locDoneEvent = new AutoResetEvent(false);
+ bool gotLoc = false;
+ float lat = 0, lng = 0;
+ _sendCommand(":Gt#,#", (a) => { gotLoc = a.Success && TryParseLatLong(a.Data, ref lat); });
+ _sendCommand(":Gg#,#", (a) => { gotLoc = gotLoc && a.Success && TryParseLatLong(a.Data, ref lng); locDoneEvent.Set(); });
+ locDoneEvent.WaitOne();
+ if (gotLoc)
+ {
+ Latitude = lat;
+ Longitude = 180.0f - lng;
+ }
+ break;
}
}
break;
diff --git a/OATControl/MainWindow.xaml b/OATControl/MainWindow.xaml
index 936c811..d4fa63d 100644
--- a/OATControl/MainWindow.xaml
+++ b/OATControl/MainWindow.xaml
@@ -544,7 +544,6 @@
-
@@ -554,7 +553,7 @@
-
+
diff --git a/OATControl/Properties/AssemblyInfo.cs b/OATControl/Properties/AssemblyInfo.cs
index 45702fa..b72bafa 100644
--- a/OATControl/Properties/AssemblyInfo.cs
+++ b/OATControl/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.9.9.26")]
+[assembly: AssemblyVersion("0.9.9.27")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OATControl/SettingsDialog.xaml.cs b/OATControl/SettingsDialog.xaml.cs
index 1f030de..9dc3e67 100644
--- a/OATControl/SettingsDialog.xaml.cs
+++ b/OATControl/SettingsDialog.xaml.cs
@@ -29,6 +29,16 @@ public SettingsDialog(MountVM mount)
dispatchTimer = new DispatcherTimer(TimeSpan.FromMilliseconds(333), DispatcherPriority.Normal, OnTimer, Dispatcher.CurrentDispatcher);
_mount = mount;
this.DataContext = _mount;
+ if ((_mount.RAStepsPerDegree < 10) || (_mount.DECStepsPerDegree < 10))
+ {
+ MessageBox.Show(
+ "It seems that the steps for RA and DEC have been incorrectly configured. It is strongly suggested to do a Factory Reset on the next screen.",
+ "Invalid EEPROM Data",
+ MessageBoxButton.OK,
+ MessageBoxImage.Exclamation
+ );
+ }
+
_mount.RAStepsPerDegreeEdit = _mount.RAStepsPerDegree;
_mount.DECStepsPerDegreeEdit = _mount.DECStepsPerDegree;
InitializeComponent();
diff --git a/README.md b/README.md
index 5e19397..6c6d2b4 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,17 @@ To install any of these, click on the latest release under Releases to the right
Change Log:
===========
+**V0.9.9.27 - Updates**
+- TCP connections did not correctly shutdown the communications thread on disconnect. This could leave zombie OATcontrol processes on the machine.
+- With no GPS, the lat long was not retrieved from OAT as the default for manual entry. It is now.
+- Detected the incorrect RA/DEC steps in the Settings and pop up a message box suggesting factory reset.
+- Fixed label width at bottom of main UI.
+
+**V0.9.9.26 - Updates**
+- Added label to slew rate boxes.
+- Added log folder link to main UI.
+- Added log file flushing in case of crash.
+
**V0.9.9.25 - Updates**
- Added Slewrate controls to Mini controller, bound to 1, 2, 3, and 4 keys.