Skip to content

Commit 87dacc0

Browse files
OATControl V0.9.8.0 - Updates
- Fixed Polar Alignment wizard
1 parent cc99b08 commit 87dacc0

File tree

3 files changed

+20
-35
lines changed

3 files changed

+20
-35
lines changed

Software/OpenAstroTracker ASCOM/OATControl/DlgRunPolarAlignment.xaml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
77
xmlns:local="clr-namespace:OATControl" xmlns:controls="clr-namespace:OATControl.Converters"
88
mc:Ignorable="d"
9-
Title="Polar Alignment" Height="275" Width="480" ResizeMode="NoResize" WindowStyle="ToolWindow" FontSize="16" FontWeight="Bold" >
9+
Title="Polar Alignment" Height="220" Width="480" ResizeMode="NoResize" WindowStyle="ToolWindow" FontSize="16" FontWeight="Bold" >
1010
<Controls:MetroWindow.Resources>
1111
<Style x:Key="StateText" TargetType="TextBlock">
1212
<Setter Property="Margin" Value="10,0" />
@@ -26,11 +26,9 @@
2626
<controls:IntToVisibilityConverter x:Key="State1Visible" VisibleValue="1" Operator=">="/>
2727
<controls:IntToVisibilityConverter x:Key="State2Visible" VisibleValue="2" Operator=">=" />
2828
<controls:IntToVisibilityConverter x:Key="State3Visible" VisibleValue="3" Operator=">=" />
29-
<controls:IntToVisibilityConverter x:Key="State4Visible" VisibleValue="4" Operator=">=" />
3029
<controls:IntToBoolConverter x:Key="State1Enabled" TrueValue="1" Operator="=="/>
3130
<controls:IntToBoolConverter x:Key="State2Enabled" TrueValue="2" Operator="==" />
3231
<controls:IntToBoolConverter x:Key="State3Enabled" TrueValue="3" Operator="==" />
33-
<controls:IntToBoolConverter x:Key="State4Enabled" TrueValue="4" Operator="==" />
3432
</Controls:MetroWindow.Resources>
3533
<Grid>
3634
<Grid.ColumnDefinitions>
@@ -59,40 +57,26 @@
5957
IsEnabled="{Binding State, Converter={StaticResource State1Enabled}}"
6058
/>
6159

62-
<TextBlock Grid.Row="1" Grid.Column="0"
63-
Text="Move the mount such that Polaris is in the center of your cameras viewfinder."
64-
Style="{StaticResource StateText}"
65-
IsEnabled="{Binding State, Converter={StaticResource State2Enabled}}"
66-
Visibility="{Binding State, Converter={StaticResource State2Visible}}"
67-
/>
68-
<Button Grid.Row="1" Grid.Column="1"
69-
Content="Done"
70-
Command="{Binding OKCommand}"
71-
Style="{StaticResource StateButton}"
72-
IsEnabled="{Binding State, Converter={StaticResource State2Enabled}}"
73-
Visibility="{Binding State, Converter={StaticResource State2Visible}}"
74-
/>
75-
7660
<TextBlock Grid.Row="2" Grid.Column="0"
77-
Text="Again move the mount such that Polaris is in the center of your cameras viewfinder."
61+
Text="Move the mount such that Polaris is in the center of your cameras viewfinder."
7862
Style="{StaticResource StateText}"
79-
IsEnabled="{Binding State, Converter={StaticResource State3Enabled}}"
80-
Visibility="{Binding State, Converter={StaticResource State3Visible}}"
63+
IsEnabled="{Binding State, Converter={StaticResource State2Enabled}}"
64+
Visibility="{Binding State, Converter={StaticResource State2Visible}}"
8165
/>
8266

8367
<Button Grid.Row="2" Grid.Column="1"
8468
Content="Done"
8569
Command="{Binding OKCommand}"
86-
IsEnabled="{Binding State, Converter={StaticResource State3Enabled}}"
87-
Visibility="{Binding State, Converter={StaticResource State3Visible}}"
70+
IsEnabled="{Binding State, Converter={StaticResource State2Enabled}}"
71+
Visibility="{Binding State, Converter={StaticResource State2Visible}}"
8872
Style="{StaticResource StateButton}"
8973
/>
9074

9175
<TextBlock Grid.Row="3" Grid.Column="0"
9276
Text="Your mount is now polar aligned."
9377
Style="{StaticResource StateText}"
94-
IsEnabled="{Binding State, Converter={StaticResource State4Enabled}}"
95-
Visibility="{Binding State, Converter={StaticResource State4Visible}}"
78+
IsEnabled="{Binding State, Converter={StaticResource State3Enabled}}"
79+
Visibility="{Binding State, Converter={StaticResource State3Visible}}"
9680
/>
9781

9882
<Button Grid.Row="3" Grid.Column="2"

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace OATControl
2222
/// <summary>
2323
/// Interaction logic for DlgChooseOat.xaml
2424
/// </summary>
25-
public partial class DlgRunPolarAlignment: MetroWindow, INotifyPropertyChanged
25+
public partial class DlgRunPolarAlignment : MetroWindow, INotifyPropertyChanged
2626
{
2727
private DelegateCommand _okCommand;
2828
private DelegateCommand _closeCommand;
@@ -43,30 +43,31 @@ public DlgRunPolarAlignment(Func<string, Task<string>> sendCommand)
4343
this.State++;
4444
if (_state == 2)
4545
{
46-
await _sendCommand($":Sr02:58:15#,n");
46+
// Move RA to Polaris
47+
await _sendCommand($":Sr02:58:51#,n");
4748

48-
// Now set DEC to move to Home position
49+
// Move DEC to twice Polaris Dec
4950
if (Settings.Default.SiteLatitude > 0) // Northern hemisphere
5051
{
51-
await _sendCommand($":Sd+90*00:00#,n");
52+
await _sendCommand($":Sd+88*42:12#,n");
5253
}
5354
else
5455
{
55-
await _sendCommand($":Sd-90*00:00#,n");
56+
await _sendCommand($":Sd-88*42:12#,n");
5657
}
5758
await _sendCommand($":MS#,n");
5859
}
5960
else if (_state == 3)
6061
{
62+
// Sync the mount to Polaris coordinates
6163
if (Settings.Default.SiteLatitude > 0) // Northern hemisphere
6264
{
63-
await _sendCommand($":Sd+89*21:03#,n");
65+
await _sendCommand($":SY+89*21:06.02:58:51#,n");
6466
}
6567
else
6668
{
67-
await _sendCommand($":Sd-89*21:03#,n");
69+
await _sendCommand($":SY-89*21:06.02:58:51#,n");
6870
}
69-
await _sendCommand($":MS#,n");
7071
}
7172
});
7273

@@ -86,8 +87,8 @@ public int State
8687
set
8788
{
8889
if (value != _state)
89-
{
90-
_state= value;
90+
{
91+
_state = value;
9192
OnPropertyChanged("State");
9293
}
9394
}

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

0 commit comments

Comments
 (0)