Skip to content

Commit 32ce649

Browse files
OATControl V0.9.9.11 - Updates
- Adapted manual slewing to use real units. Requires V1.8.46 or later OAT firmware.
1 parent 0019bfd commit 32ce649

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

Software/OpenAstroTracker ASCOM/OATControl/DlgChooseOat.xaml.cs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public enum Steps
3939
};
4040
private DelegateCommand _rescanCommand;
4141
private DelegateCommand _connectAndNextCommand;
42-
private float _latitude = 45;
43-
private float _longitude = -75;
42+
private float _latitude = 15;
43+
private float _longitude = -15;
4444
private float _altitude = 100;
4545
private string _device;
4646
private bool _showGPSStatus = false;
@@ -361,16 +361,19 @@ private async void ProcessStateMachine(object sender, EventArgs e)
361361
case Steps.WaitForLevel:
362362
// Get the current digital level angles.
363363
string currentAngles = await _sendCommand(":XLGC#,#");
364-
float currentRoll = float.Parse(currentAngles.Split(",".ToCharArray())[1]);
365-
366-
// Keep a rolling average of the last 6 values.
367-
if (_rollOffsetHistory.Count > 5)
364+
if (!currentAngles.Contains("NAN"))
368365
{
369-
_rollOffsetHistory.RemoveAt(0);
370-
}
366+
float currentRoll = float.Parse(currentAngles.Split(",".ToCharArray())[1]);
371367

372-
_rollOffsetHistory.Add(currentRoll - _rollReference);
373-
RollOffset = _rollOffsetHistory.Average();
368+
// Keep a rolling average of the last 6 values.
369+
if (_rollOffsetHistory.Count > 5)
370+
{
371+
_rollOffsetHistory.RemoveAt(0);
372+
}
373+
374+
_rollOffsetHistory.Add(currentRoll - _rollReference);
375+
RollOffset = _rollOffsetHistory.Average();
376+
}
374377
break;
375378

376379
case Steps.WaitForGPS:

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.9.10")]
54+
[assembly: AssemblyVersion("0.9.9.11")]
5555
[assembly: AssemblyFileVersion("1.0.0.0")]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class MountVM : ViewModelBase
5252
string _driftAlignStatus = "Drift Alignment";
5353
float _driftPhase = 0;
5454

55-
private float _maxMotorSpeed = 500;
55+
private float _maxMotorSpeed = 2.5f;
5656
double _speed = 1.0;
5757
string _scopeName = string.Empty;
5858
string _scopeHardware = string.Empty;
@@ -1166,7 +1166,7 @@ private async void SlewRateChanged(int arg1, int newRate)
11661166
float[] speeds = { 0, 0.05f, 0.15f, 0.5f, 1.0f };
11671167
string slewRateComdChar = "_GCMS";
11681168

1169-
MaxMotorSpeed = speeds[newRate] * ((_raIsNEMA || _decIsNEMA) ? 1000 : 500);
1169+
MaxMotorSpeed = speeds[newRate] * 2.5f; // Can't go much quicker than 2.5 degs/sec
11701170

11711171
if (MountConnected)
11721172
{

0 commit comments

Comments
 (0)