Skip to content

Commit

Permalink
Delayed internal/external hip selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-r committed Nov 8, 2022
1 parent 2ab6196 commit 8b9f68d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ASCOM.HomeMade.SBIGCamera.iss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[Setup]
AppID={{3a7e63ad-c913-44f0-9489-e1744c9c2991}}
AppName=ASCOM HomeMade Camera
AppVerName=ASCOM HomeMade SBig Camera Driver 1.2.3
AppVersion=1.2.3
AppVerName=ASCOM HomeMade SBig Camera Driver 1.2.4
AppVersion=1.2.4
AppPublisher=Cedric Raguenaud <cedric@raguenaud.earth>
AppPublisherURL=mailto:cedric@raguenaud.earth
AppSupportURL=https://github.com/cedric-r/ASCOM.HomeMade.SBIGCamera
AppUpdatesURL=https://github.com/cedric-r/ASCOM.HomeMade.SBIGCamera
VersionInfoVersion=1.2.3
VersionInfoVersion=1.2.4
MinVersion=0,6.1
DefaultDirName="{cf}\ASCOM\Camera\HomeMade SBIGCamera\"
DisableDirPage=yes
Expand Down
4 changes: 4 additions & 0 deletions ASCOM.HomeMade.SBIGCamera/SBIGCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ public SBIGCamera()
debug.LogMessage("Camera", "Completed initialisation");
}

protected virtual void AdjustSettings() { }

//
// PUBLIC COM INTERFACE ICameraV2 IMPLEMENTATION
//
Expand Down Expand Up @@ -186,6 +188,7 @@ public bool Connected
{
debug.LogMessage("Connected", "Already connected");
cameraInfo = GetCameraSpecs();
AdjustSettings();

return;
}
Expand Down Expand Up @@ -213,6 +216,7 @@ public bool Connected
debug.LogMessage("Connected Set", $"Connected to camera");

cameraInfo = GetCameraSpecs();
AdjustSettings();
}
}
else
Expand Down
4 changes: 2 additions & 2 deletions ASCOM.HomeMade.SBIGCommon/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@
// by using the '*' as shown below:
//
// TODO - Set your driver's version here
[assembly: AssemblyVersion("1.2.3.0")]
[assembly: AssemblyFileVersion("1.2.3.0")]
[assembly: AssemblyVersion("1.2.4.0")]
[assembly: AssemblyFileVersion("1.2.4.0")]
13 changes: 11 additions & 2 deletions ASCOM.HomeMade.SBIGGuidingCamera/Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class Camera : SBIGCamera.SBIGCamera
/// Initializes a new instance of the <see cref="HomeMade"/> class.
/// Must be public for COM registration.
/// </summary>
public Camera()
public Camera() : base()
{
string strPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData);
strPath = Path.Combine(strPath, driverID);
Expand All @@ -88,11 +88,20 @@ public Camera()
debug.LogMessage("Process ID: " + nProcessID);

CameraType = SBIG.CCD_REQUEST.CCD_TRACKING;
if (cameraInfo.STXLCamera) CameraType = SBIG.CCD_REQUEST.CCD_EXT_TRACKING;

debug.LogMessage("Camera", "Completed initialisation");
}

protected override void AdjustSettings()
{
// This is a cheat for the STXL that needs to know the type of camera but the information is only available at connection time. This is nasty design!
if (cameraInfo.STXLCamera)
{
debug.LogMessage("Camera", "Camera is STXL, setting to external guiding chip");
CameraType = SBIG.CCD_REQUEST.CCD_EXT_TRACKING;
}
}

public new string Description
{
// TODO customise this device description
Expand Down
Binary file modified HomeMade SBIG Camera Setup.exe
Binary file not shown.

0 comments on commit 8b9f68d

Please sign in to comment.