Skip to content

Commit 4ae4a76

Browse files
Merge pull request #65 from OpenAstroTech/ascom-7-and-fixes
V1.1.23.0 Updates
2 parents be7f03d + 70e0ee9 commit 4ae4a76

8 files changed

Lines changed: 49 additions & 103 deletions

File tree

OATControl/DlgAppSettings.xaml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<Setter Property="Height" Value="11" />
6262
<Setter Property="Background" Value="#770000" />
6363
<Setter Property="Foreground" Value="#F00" />
64-
<Setter Property="Width" Value="40" />
64+
<Setter Property="Width" Value="50" />
6565
<Setter Property="HorizontalContentAlignment" Value="Center"/>
6666
</Style>
6767
<Style x:Key="TextBoxSmall" TargetType="TextBox" BasedOn="{StaticResource MetroTextBox}" >
@@ -583,31 +583,20 @@
583583
<Grid.RowDefinitions>
584584
<RowDefinition Height="Auto"/>
585585
<RowDefinition Height="Auto"/>
586-
<RowDefinition Height="Auto"/>
587586
</Grid.RowDefinitions>
588587
<Grid.ColumnDefinitions>
589588
<ColumnDefinition Width="*" />
590589
<ColumnDefinition Width="*" />
591-
<ColumnDefinition Width="*" />
592-
<ColumnDefinition Width="*" />
593590
</Grid.ColumnDefinitions>
594-
595-
<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="AZ Limits" Style="{StaticResource TextBlockLabel}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,5,0,0"/>
596-
<TextBox Grid.Row="1" Grid.Column="0" Text="{Binding AZLeftLimit}" HorizontalAlignment="Left" Style="{StaticResource TextBoxSmallLimit}" />
597-
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding AZRightLimit}" HorizontalAlignment="Left" Style="{StaticResource TextBoxSmallLimit}" Margin="5,0,15,0"/>
598-
<TextBlock Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Text="ALT Limits" Style="{StaticResource TextBlockLabel}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,5,0,0"/>
599-
<TextBox Grid.Row="1" Grid.Column="2" Text="{Binding ALTUpLimit}" HorizontalAlignment="Left" Style="{StaticResource TextBoxSmallLimit}" />
600-
<TextBox Grid.Row="1" Grid.Column="3" Text="{Binding ALTDownLimit}" HorizontalAlignment="Left" Style="{StaticResource TextBoxSmallLimit}" />
601-
<TextBlock Grid.Row="2" Grid.Column="0" Text="Left" Style="{StaticResource TextBlockLabelTiny}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,0,0,0"/>
602-
<TextBlock Grid.Row="2" Grid.Column="1" Text="Right" Style="{StaticResource TextBlockLabelTiny}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="5,0,15,0"/>
603-
<TextBlock Grid.Row="2" Grid.Column="2" Text="Up" Style="{StaticResource TextBlockLabelTiny}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,0,0,0"/>
604-
<TextBlock Grid.Row="2" Grid.Column="3" Text="Down" Style="{StaticResource TextBlockLabelTiny}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,0,0,0"/>
591+
<TextBlock Grid.Row="0" Grid.Column="0" Text="AZ Limits" Style="{StaticResource TextBlockLabel}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,5,20,0"/>
592+
<TextBox Grid.Row="1" Grid.Column="0" Text="{Binding AZLimit}" HorizontalAlignment="Left" Style="{StaticResource TextBoxSmallLimit}" />
593+
<TextBlock Grid.Row="0" Grid.Column="1" Text="ALT Limits" Style="{StaticResource TextBlockLabel}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,5,20,0"/>
594+
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding ALTLimit}" HorizontalAlignment="Left" Style="{StaticResource TextBoxSmallLimit}" />
605595

606596
</Grid>
607597
</Border>
608598
</Grid>
609599
</TabItem>
610-
611600
</TabControl>
612601
</DockPanel>
613602
</mah:MetroWindow>

OATControl/DlgAppSettings.xaml.cs

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -212,42 +212,22 @@ public bool InvertAZCorrections
212212
}
213213
}
214214

215-
public float AZLeftLimit
215+
public float AZLimit
216216
{
217-
get { return _mount.AZLeftLimit; }
217+
get { return _mount.AZLimit; }
218218
set
219219
{
220-
_mount.AZLeftLimit = value;
220+
_mount.AZLimit = value;
221221
OnPropertyChanged();
222222
}
223223
}
224224

225-
public float AZRightLimit
225+
public float ALTLimit
226226
{
227-
get { return _mount.AZRightLimit; }
227+
get { return _mount.ALTLimit; }
228228
set
229229
{
230-
_mount.AZRightLimit = value;
231-
OnPropertyChanged();
232-
}
233-
}
234-
235-
public float ALTUpLimit
236-
{
237-
get { return _mount.ALTUpLimit; }
238-
set
239-
{
240-
_mount.ALTUpLimit = value;
241-
OnPropertyChanged();
242-
}
243-
}
244-
245-
public float ALTDownLimit
246-
{
247-
get { return _mount.ALTDownLimit; }
248-
set
249-
{
250-
_mount.ALTDownLimit = value;
230+
_mount.ALTLimit = value;
251231
OnPropertyChanged();
252232
}
253233
}

OATControl/OATControl Setup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "OATControl"
5-
#define MyAppVersion "1.1.22.0"
5+
#define MyAppVersion "1.1.23.0"
66
#define MyAppPublisher "OpenAstroTech"
77
#define MyAppURL "https://wiki.openastrotech.com/"
88
#define MyAppExeName "OATControl.exe"

OATControl/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
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("1.1.22.0")]
55-
[assembly: AssemblyFileVersion("1.1.22.0")]
54+
[assembly: AssemblyVersion("1.1.23.0")]
55+
[assembly: AssemblyFileVersion("1.1.23.0")]

OATControl/Readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Revision History
22
----------------
33

4+
OATControl V1.1.23.0 29 Dec 2025
5+
- Changed AutoPA limits to be symmetrical.
6+
47
OATControl V1.1.22.0 27 Dec 2025
58
- Improved the instructions for axis calibration.
69
- Added some more logging during calibration.

OATControl/ViewModels/AppSettings.cs

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -539,32 +539,18 @@ public string SharpCapLogFolder
539539
set { this["SharpCapLogFolder"] = value; }
540540
}
541541

542-
[DefaultValueAttribute("2")]
543-
public float AZLeftLimit
542+
[DefaultValueAttribute("3")]
543+
public float AZLimit
544544
{
545-
get { return Convert.ToSingle(this["AZLeftLimit"] ?? "2"); }
546-
set { this["AZLeftLimit"] = value.ToString(); }
545+
get { return Convert.ToSingle(this["AZLimit"] ?? "3"); }
546+
set { this["AZLimit"] = value.ToString(); }
547547
}
548548

549-
[DefaultValueAttribute("2")]
550-
public float AZRightLimit
549+
[DefaultValueAttribute("3")]
550+
public float ALTLimit
551551
{
552-
get { return Convert.ToSingle(this["AZRightLimit"] ?? "2"); }
553-
set { this["AZRightLimit"] = value.ToString(); }
554-
}
555-
556-
[DefaultValueAttribute("2")]
557-
public float ALTUpLimit
558-
{
559-
get { return Convert.ToSingle(this["ALTUpLimit"] ?? "2"); }
560-
set { this["ALTUpLimit"] = value.ToString(); }
561-
}
562-
563-
[DefaultValueAttribute("2")]
564-
public float ALTDownLimit
565-
{
566-
get { return Convert.ToSingle(this["ALTDownLimit"] ?? "2"); }
567-
set { this["ALTDownLimit"] = value.ToString(); }
552+
get { return Convert.ToSingle(this["ALTLimit"] ?? "3"); }
553+
set { this["ALTLimit"] = value.ToString(); }
568554
}
569555
}
570556
}

OATControl/ViewModels/MountVM.cs

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ public class MountVM : ViewModelBase
4444
float _decStepper = 0;
4545
float _altStepper = 0;
4646
float _azStepper = 0;
47-
float _azRightLimit = 2.0f;
48-
float _azLeftLimit = 2.0f;
49-
float _altUpLimit = 4.0f;
50-
float _altDownLimit = 4.0f;
47+
float _azLimit = 2.0f;
48+
float _altLimit = 4.0f;
5149
float _trkStepper = 0;
5250
long _focStepper = 0;
5351
float _raStepsPerDegree = 1;
@@ -526,10 +524,8 @@ public MountVM()
526524
}, async (s) => await OnLogActivity(s));
527525
_sharpCapLogProcessor.CorrectionRequired += OnPolarAlignCorrectionRequired;
528526
MonitorSharpCapForPA = AppSettings.Instance.MonitorSharpCapPA;
529-
_azLeftLimit = AppSettings.Instance.AZLeftLimit;
530-
_azRightLimit = AppSettings.Instance.AZRightLimit;
531-
_altUpLimit = AppSettings.Instance.ALTUpLimit;
532-
_altDownLimit = AppSettings.Instance.ALTDownLimit;
527+
_azLimit = AppSettings.Instance.AZLimit;
528+
_altLimit = AppSettings.Instance.ALTLimit;
533529
}
534530

535531
private bool _isNinaLogActive;
@@ -3718,35 +3714,22 @@ public float AZStepper
37183714
set { SetPropertyValue(ref _azStepper, value); }
37193715
}
37203716

3721-
public float AZLeftLimit
3717+
public float AZLimit
37223718
{
3723-
get { return _azLeftLimit; }
3724-
set { SetPropertyValue(ref _azLeftLimit, value, OnAltAzLimitsChanged); }
3725-
}
3726-
public float AZRightLimit
3727-
{
3728-
get { return _azRightLimit; }
3729-
set { SetPropertyValue(ref _azRightLimit, value, OnAltAzLimitsChanged); }
3730-
}
3731-
3732-
public float ALTUpLimit
3733-
{
3734-
get { return _altUpLimit; }
3735-
set { SetPropertyValue(ref _altUpLimit, value, OnAltAzLimitsChanged); }
3719+
get { return _azLimit; }
3720+
set { SetPropertyValue(ref _azLimit, value, OnAltAzLimitsChanged); }
37363721
}
37373722

3738-
public float ALTDownLimit
3723+
public float ALTLimit
37393724
{
3740-
get { return _altDownLimit; }
3741-
set { SetPropertyValue(ref _altDownLimit, value, OnAltAzLimitsChanged); }
3725+
get { return _altLimit; }
3726+
set { SetPropertyValue(ref _altLimit, value, OnAltAzLimitsChanged); }
37423727
}
37433728

37443729
void OnAltAzLimitsChanged(float a, float b )
37453730
{
3746-
AppSettings.Instance.AZLeftLimit = AZLeftLimit;
3747-
AppSettings.Instance.AZRightLimit = AZRightLimit;
3748-
AppSettings.Instance.ALTUpLimit = ALTUpLimit;
3749-
AppSettings.Instance.ALTDownLimit = ALTDownLimit;
3731+
AppSettings.Instance.AZLimit = AZLimit;
3732+
AppSettings.Instance.ALTLimit = ALTLimit;
37503733
AppSettings.Instance.Save();
37513734
}
37523735

OATControl/ViewModels/NinaPolarAlignLogProcessor.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,26 +149,31 @@ protected override void ProcessLogLines()
149149
var azAdjust = (AppSettings.Instance.InvertAZCorrections ? -1 : 1) * ParseMinutes(azError, @"^([+-]?\d+)[+°\s]+(\d+)[\'\s]+(\d+)[\""\s]*$");
150150
var altAdjust = (AppSettings.Instance.InvertALTCorrections ? -1 : 1) * ParseMinutes(altError, @"^([+-]?\d+)[°\s]+(\d+)[\'\s]+(\d+)[\""\s]*$");
151151

152-
Log.WriteLine($"NINALOG: Required adjustment is AZ:{azAdjust}, ALT: {altAdjust}");
153-
if (azAdjust < 60 * AppSettings.Instance.AZLeftLimit || azAdjust > -60 * AppSettings.Instance.AZRightLimit)
152+
Log.WriteLine($"NINALOG: Required adjustment is AZ:{azAdjust}, ALT: {altAdjust}.");
153+
Log.WriteLine($"NINALOG: Adjustment AZ Limits: {60 * AppSettings.Instance.AZLimit}");
154+
155+
if (Math.Abs(azAdjust) > 60 * AppSettings.Instance.AZLimit)
154156
{
155-
Log.WriteLine($"NINALOG: AZ Adjustment is too large!");
157+
Log.WriteLine($"NINALOG: AZ Adjustment is too large! (Requested ${azAdjust}m, but limit is ${60 * AppSettings.Instance.AZLimit}m)");
156158
string msg = "";
157-
msg = $"Azimuth error is too large for automatic adjustment, please move mount manually to within {AppSettings.Instance.AZLeftLimit.ToString("F1")} degrees left and {AppSettings.Instance.AZRightLimit.ToString("F1")} degrees right.";
159+
msg = $"Azimuth error is too large for automatic adjustment, please move mount manually to within {AppSettings.Instance.AZLimit.ToString("F1")} degrees horizontally.";
158160
ShowDialogStatus("Error", msg);
159161
_numCalculatedErrors = 0;
160162
return;
161163
}
162164

163-
if (altAdjust < 60 * AppSettings.Instance.ALTUpLimit || azAdjust > -60 * AppSettings.Instance.ALTDownLimit)
165+
Log.WriteLine($"NINALOG: Adjustment ALT Limits: {60 * AppSettings.Instance.ALTLimit}");
166+
167+
if (Math.Abs(altAdjust) > 60 * AppSettings.Instance.ALTLimit)
164168
{
165169
string msg = "";
166-
Log.WriteLine($"NINALOG: ALT Adjustment is too large!");
167-
msg = $"Altitude error is too large for automatic adjustment, please move mount manually to within {AppSettings.Instance.ALTUpLimit.ToString("F1")} degrees up and {AppSettings.Instance.ALTDownLimit.ToString("F1")} degrees down.";
170+
Log.WriteLine($"NINALOG: ALT Adjustment is too large! (Requested ${altAdjust}m, but limit is ${60 * AppSettings.Instance.ALTLimit}m)");
171+
msg = $"Altitude error is too large for automatic adjustment, please move mount manually to within {AppSettings.Instance.ALTLimit.ToString("F1")} degrees vertically.";
168172
ShowDialogStatus("Error", msg);
169173
_numCalculatedErrors = 0;
170174
return;
171175
}
176+
172177
Log.WriteLine($"NINALOG: Sending Adjustment to mount");
173178
RaiseCorrectionRequired(new PolarAlignCorrectionEventArgs(altAdjust, azAdjust));
174179
_polarAlignState = "Adjusting";

0 commit comments

Comments
 (0)