Skip to content

Commit

Permalink
Corrected movement of telescope motion East/West button movement.
Browse files Browse the repository at this point in the history
Added GuideRateRightAscension and GuideRateDeclination to Parameters collection and View and ViewModel.
Update user guide with new screenshot of telescope  parameters screen.
  • Loading branch information
astroman133 committed May 22, 2022
1 parent d638834 commit faeb90c
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public TelescopeParameters( TelescopeManager mgr )
DriverVersion = mgr.DriverVersion;
EquatorialSystem = mgr.EquatorialSystem;
FocalLength = mgr.FocalLength;
GuideRateDeclination = mgr.GuideRateDeclination;
GuideRateRightAscension = mgr.GuideRateRightAscension;
InterfaceVersion = mgr.InterfaceVersion;
SiteElevation = mgr.SiteElevation;
SiteLatitude = mgr.SiteLatitude;
Expand Down Expand Up @@ -89,6 +91,8 @@ public TelescopeParameters( TelescopeParameters other )
this._driverVersion = other.DriverVersion;
this._equatorialSystem = other.EquatorialSystem;
this._focalLength = other.FocalLength;
this._guideRateDeclination = other.GuideRateDeclination;
this._guideRateRightAscension = other.GuideRateRightAscension;
this._interfaceVersion = other.InterfaceVersion;
this._siteElevation = other.SiteElevation;
this._siteLatitude = other.SiteLatitude;
Expand Down Expand Up @@ -260,6 +264,39 @@ public double FocalLength
}
}

private double _guideRateDeclination;

public double GuideRateDeclination
{
get { return _guideRateDeclination; }
set
{
if ( value != _guideRateDeclination )
{
GetExceptionFromManager();
_guideRateDeclination = value;
OnPropertyChanged();
}
}
}

private double _guideRateRightAscension;

public double GuideRateRightAscension

{
get { return _guideRateRightAscension; }
set
{
if ( value != _guideRateRightAscension )
{
GetExceptionFromManager();
_guideRateRightAscension = value;
OnPropertyChanged();
}
}
}

private double _siteElevation;

public double SiteElevation
Expand Down
8 changes: 4 additions & 4 deletions DeviceHub/DeviceManagers/TelescopeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1430,8 +1430,8 @@ private ObservableCollection<JogDirection> InitializeJogDirections()
{
new JogDirection { Name = "N", Description = "North", MoveDirection = MoveDirections.North, Axis = TelescopeAxes.axisSecondary, RateSign = 1.0, GuideDirection = GuideDirections.guideNorth },
new JogDirection { Name = "S", Description = "South", MoveDirection = MoveDirections.South, Axis = TelescopeAxes.axisSecondary, RateSign = -1.0, GuideDirection = GuideDirections.guideSouth },
new JogDirection { Name = "W", Description = "West", MoveDirection = MoveDirections.West, Axis = TelescopeAxes.axisPrimary, RateSign = -1.0, GuideDirection = GuideDirections.guideWest },
new JogDirection { Name = "E", Description = "East", MoveDirection = MoveDirections.East, Axis = TelescopeAxes.axisPrimary, RateSign = 1.0, GuideDirection = GuideDirections.guideEast }
new JogDirection { Name = "W", Description = "West", MoveDirection = MoveDirections.West, Axis = TelescopeAxes.axisPrimary, RateSign = 1.0, GuideDirection = GuideDirections.guideWest },
new JogDirection { Name = "E", Description = "East", MoveDirection = MoveDirections.East, Axis = TelescopeAxes.axisPrimary, RateSign = -1.0, GuideDirection = GuideDirections.guideEast }
};

try
Expand All @@ -1453,8 +1453,8 @@ private ObservableCollection<JogDirection> InitializeJogDirections()

directions.Add( new JogDirection { Name = "S", Description = "South", MoveDirection = MoveDirections.South, Axis = TelescopeAxes.axisSecondary, RateSign = -1.0, GuideDirection = GuideDirections.guideSouth } );
directions.Add( new JogDirection { Name = "N", Description = "North", MoveDirection = MoveDirections.North, Axis = TelescopeAxes.axisSecondary, RateSign = 1.0, GuideDirection = GuideDirections.guideNorth } );
directions.Add( new JogDirection { Name = "W", Description = "West", MoveDirection = MoveDirections.West, Axis = TelescopeAxes.axisPrimary, RateSign = -1.0, GuideDirection = GuideDirections.guideWest } );
directions.Add( new JogDirection { Name = "E", Description = "East", MoveDirection = MoveDirections.East, Axis = TelescopeAxes.axisPrimary, RateSign = 1.0, GuideDirection = GuideDirections.guideEast } );
directions.Add( new JogDirection { Name = "W", Description = "West", MoveDirection = MoveDirections.West, Axis = TelescopeAxes.axisPrimary, RateSign = 1.0, GuideDirection = GuideDirections.guideWest } );
directions.Add( new JogDirection { Name = "E", Description = "East", MoveDirection = MoveDirections.East, Axis = TelescopeAxes.axisPrimary, RateSign = -1.0, GuideDirection = GuideDirections.guideEast } );
}
}
}
Expand Down
47 changes: 31 additions & 16 deletions DeviceHub/View Classes/Telescope Views/TelescopeParametersView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:local="clr-namespace:ASCOM.DeviceHub"
mc:Ignorable="d"
Background="{DynamicResource WindowBackgroundBrush}"
d:DesignHeight="400" d:DesignWidth="440">
d:DesignHeight="400" d:DesignWidth="460">
<UserControl.Resources>
<local:AlignmentModeToStringConverter x:Key="AlignModeConverter" />
<local:EquCoordTypeToStringConverter x:Key="EquCoordConverter" />
Expand Down Expand Up @@ -45,6 +45,8 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
Expand All @@ -59,13 +61,15 @@
<Label Grid.Row="6" Grid.Column="0" Content="Driver Version:" Style="{StaticResource CapLabel}" />
<Label Grid.Row="7" Grid.Column="0" Content="Equatorial System:" Style="{StaticResource CapLabel}" />
<Label Grid.Row="8" Grid.Column="0" Content="Focal Length (m):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="9" Grid.Column="0" Content="Interface Version:" Style="{StaticResource CapLabel}" />
<Label Grid.Row="10" Grid.Column="0" Content="Site Elevation (m):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="11" Grid.Column="0" Content="Site Latitude (°):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="12" Grid.Column="0" Content="Site Longitude (°):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="13" Grid.Column="0" Content="Slew Settle Time (sec):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="14" Grid.Column="0" Content="SupportedActions:" Style="{StaticResource CapLabel}" />
<Label Grid.Row="15" Grid.Column="0" Content="Tracking Rates:" Style="{StaticResource CapLabel}" />
<Label Grid.Row="9" Grid.Column="0" Content="Guide Rate Declination (°/sec):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="10" Grid.Column="0" Content="Guide Rate Right Ascension (°/sec)::" Style="{StaticResource CapLabel}" />
<Label Grid.Row="11" Grid.Column="0" Content="Interface Version:" Style="{StaticResource CapLabel}" />
<Label Grid.Row="12" Grid.Column="0" Content="Site Elevation (m):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="13" Grid.Column="0" Content="Site Latitude (°):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="14" Grid.Column="0" Content="Site Longitude (°):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="15" Grid.Column="0" Content="Slew Settle Time (sec):" Style="{StaticResource CapLabel}" />
<Label Grid.Row="16" Grid.Column="0" Content="SupportedActions:" Style="{StaticResource CapLabel}" />
<Label Grid.Row="17" Grid.Column="0" Content="Tracking Rates:" Style="{StaticResource CapLabel}" />

<Label Grid.Row="0" Grid.Column="1" Content="{Binding Parameters.AlignmentMode, Converter={StaticResource AlignModeConverter}}" Style="{StaticResource CapValue}" />
<Label Grid.Row="1" Grid.Column="1" Style="{StaticResource CapValue}">
Expand All @@ -78,7 +82,8 @@
<TextBlock Text="{Binding Parameters.ApertureDiameter, StringFormat=F3, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" />
</Label.Content>
</Label>
<Label Grid.Row="3" Grid.Column="1" Content="{Binding Parameters.Description}" Style="{StaticResource CapValue}" />
<Label Grid.Row="3" Grid.Column="1" Content="{Binding Parameters.Description}" Style="{StaticResource CapValue}"
ToolTip="{Binding Parameters.Description}" />
<Label Grid.Row="4" Grid.Column="1" Content="{Binding Parameters.DoesRefraction}" Style="{StaticResource CapValue}" />
<Label Grid.Row="5" Grid.Column="1" Content="{Binding Parameters.DriverInfo}" Style="{StaticResource CapValue}"
ToolTip="{Binding Parameters.DriverInfo}" />
Expand All @@ -89,24 +94,34 @@
<TextBlock Text="{Binding Parameters.FocalLength, StringFormat=F3, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" />
</Label.Content>
</Label>
<Label Grid.Row="9" Grid.Column="1" Content="{Binding Parameters.InterfaceVersion}" Style="{StaticResource CapValue}" />
<Label Grid.Row="10" Grid.Column="1" Style="{StaticResource CapValue}">
<Label Grid.Row="9" Grid.Column="1" Style="{StaticResource CapValue}">
<Label.Content>
<TextBlock Text="{Binding Parameters.GuideRateDeclination, StringFormat=F5, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" />
</Label.Content>
</Label>
<Label Grid.Row="10" Grid.Column="1" Style="{StaticResource CapValue}">
<Label.Content>
<TextBlock Text="{Binding Parameters.GuideRateRightAscension, StringFormat=F5, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" />
</Label.Content>
</Label>
<Label Grid.Row="11" Grid.Column="1" Content="{Binding Parameters.InterfaceVersion}" Style="{StaticResource CapValue}" />
<Label Grid.Row="12" Grid.Column="1" Style="{StaticResource CapValue}">
<Label.Content>
<TextBlock Text="{Binding Parameters.SiteElevation, StringFormat=F0, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" />
</Label.Content>
</Label>
<Label Grid.Row="11" Grid.Column="1" Style="{StaticResource CapValue}">
<Label Grid.Row="13" Grid.Column="1" Style="{StaticResource CapValue}">
<Label.Content>
<TextBlock Text="{Binding Parameters.SiteLatitude, StringFormat=F5, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" />
</Label.Content>
</Label>
<Label Grid.Row="12" Grid.Column="1" Style="{StaticResource CapValue}">
<Label Grid.Row="14" Grid.Column="1" Style="{StaticResource CapValue}">
<Label.Content>
<TextBlock Text="{Binding Parameters.SiteLongitude, StringFormat=F5, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" />
</Label.Content>
</Label>
<Label Grid.Row="13" Grid.Column="1" Content="{Binding Parameters.SlewSettleTime}" Style="{StaticResource CapValue}" />
<ListBox Grid.Row="14" Grid.Column="1" Height="Auto" MinHeight="84" MinWidth="220" Width="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="8,4,0,0"
<Label Grid.Row="15" Grid.Column="1" Content="{Binding Parameters.SlewSettleTime}" Style="{StaticResource CapValue}" />
<ListBox Grid.Row="16" Grid.Column="1" Height="Auto" MinHeight="84" MinWidth="220" Width="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="8,4,0,0"
Focusable="False" IsHitTestVisible="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"
ItemsSource="{Binding Parameters.SupportedActions}" >
Expand All @@ -121,7 +136,7 @@
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
<ListBox Grid.Row="15" Grid.Column="1" Height="Auto" MinHeight="64" MinWidth="220" Width="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="8,2,0,0"
<ListBox Grid.Row="17" Grid.Column="1" Height="Auto" MinHeight="64" MinWidth="220" Width="Auto" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="8,2,0,0"

Focusable="False" IsHitTestVisible="False"
ItemsSource="{Binding Parameters.TrackingRates}" DisplayMemberPath="Name" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
Expand Down
Binary file modified Documents/ASCOM Device Hub User and Technical Information.docx
Binary file not shown.
Binary file modified Documents/ASCOM Device Hub User and Technical Information.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion Inno Setup/ASCOM Device Hub Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
;

#define MyAppName "ASCOM.DeviceHub"
#define MyAppVersion "6.6.0.8"
#define MyAppVersion "6.6.0.9"
#define MyDestSubdirName "DeviceHub"
; #define MyPlatformRoot "D:\Github Repos\ASCOMPlatform\"
#define MyPlatformRoot "D:\My Projects\Visual Studio 2022\Ascom\"
Expand Down
2 changes: 1 addition & 1 deletion ProductAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
// 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( "6.6.0.8" )]
[assembly: AssemblyVersion( "6.6.0.9" )]
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public void ConnectTest()
Assert.AreEqual( _svc.DriverVersion, _mgr.Parameters.DriverVersion );
Assert.AreEqual( _svc.EquatorialSystem, _mgr.Parameters.EquatorialSystem );
Assert.AreEqual( _svc.FocalLength, _mgr.Parameters.FocalLength );
Assert.AreEqual( _svc.GuideRateDeclination, _mgr.Parameters.GuideRateDeclination );
Assert.AreEqual( _svc.GuideRateRightAscension, _mgr.Parameters.GuideRateRightAscension );
Assert.AreEqual( 3, _mgr.Parameters.InterfaceVersion );
Assert.AreEqual( _svc.SiteElevation, _mgr.Parameters.SiteElevation );
Assert.AreEqual( _svc.SiteLatitude, _mgr.Parameters.SiteLatitude );
Expand Down Expand Up @@ -115,7 +117,7 @@ public void JogScopePrimaryTest()
_mgr.StartJogScope( ndx, jogRates[0].Rate );

double actualRate = _svc.MockMoveAxisRates.X;
Assert.AreEqual( jogRates[0].Rate, actualRate * -1.0 );
Assert.AreEqual( jogRates[0].Rate, actualRate * 1.0 );

_mgr.StopJogScope( ndx );

Expand All @@ -128,7 +130,7 @@ public void JogScopePrimaryTest()
_mgr.StartJogScope( ndx, jogRates[0].Rate );

actualRate = _svc.MockMoveAxisRates.X;
Assert.AreEqual( jogRates[0].Rate, actualRate );
Assert.AreEqual( jogRates[0].Rate, actualRate * -1.0 );

_mgr.StopJogScope( ndx );

Expand Down

0 comments on commit faeb90c

Please sign in to comment.