Skip to content

Commit

Permalink
fixing camera states
Browse files Browse the repository at this point in the history
  • Loading branch information
totoantibes committed Feb 12, 2023
1 parent a9ffa26 commit b4c9b62
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
Binary file modified ASCOM.Lumix.Camera Setup.exe
Binary file not shown.
Binary file modified ASCOM.Lumix.Camera Setup32.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions LumixCamera/ASCOM.Lumix.Camera Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
[Setup]
AppID={{77b4d898-3116-40a5-91d4-4c41ff123d93}
AppName=ASCOM ASCOM.Lumix.Camera Camera Driver
AppVerName=ASCOM ASCOM.Lumix.Camera Camera Driver 7.0.6
AppVersion=7.0.6
AppVerName=ASCOM ASCOM.Lumix.Camera Camera Driver 7.1
AppVersion=7.1
AppPublisher=robert hasson <robert_hasson@yahoo.com>
AppPublisherURL=mailto:robert_hasson@yahoo.com
AppSupportURL=http://tech.groups.yahoo.com/group/ASCOM-Talk/
AppUpdatesURL=http://ascom-standards.org/
VersionInfoVersion=7.0.6
VersionInfoVersion=7.1
MinVersion=0,6.0
DefaultDirName="{cf}\ASCOM\Camera"
DisableDirPage=yes
Expand Down
6 changes: 3 additions & 3 deletions LumixCamera/ASCOM.Lumix.Camera Setup32.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
[Setup]
AppID={{77b4d898-3116-40a5-91d4-4c41ff123d93}
AppName=ASCOM ASCOM.Lumix.Camera Camera Driver
AppVerName=ASCOM ASCOM.Lumix.Camera Camera Driver 7.0.6
AppVersion=7.0.6
AppVerName=ASCOM ASCOM.Lumix.Camera Camera Driver 7.1
AppVersion=7.1
AppPublisher=robert hasson <robert_hasson@yahoo.com>
AppPublisherURL=mailto:robert_hasson@yahoo.com
AppSupportURL=http://tech.groups.yahoo.com/group/ASCOM-Talk/
AppUpdatesURL=http://ascom-standards.org/
VersionInfoVersion=7.0.6
VersionInfoVersion=7.1
MinVersion=0,6.0
DefaultDirName="{cf}\ASCOM\Camera"
DisableDirPage=yes
Expand Down
9 changes: 7 additions & 2 deletions LumixCamera/Driver.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,7 @@ Public Class Camera
TL.LogMessage("ImageArray Get", "Throwing InvalidOperationException because of a call to ImageArray before the first image has been taken!")
Throw New ASCOM.InvalidOperationException("Call to ImageArray before the first image has been taken!")
End If
CurrentState = CameraStates.cameraDownload
Dim Tiffimagefile As IO.FileStream
Tiffimagefile = New FileStream(TiffFileName, IO.FileMode.Open)
ReDim cameraImageArray(cameraNumX - 1, cameraNumY - 1) ' there are 3 channels: RVB.
Expand Down Expand Up @@ -1170,6 +1171,8 @@ Public Class Camera

TL.LogMessage("ImageArray Get", "getting the Array")
cameraImageReady = False
CurrentState = CameraStates.cameraIdle

Return cameraImageArray
End Get
End Property
Expand All @@ -1180,14 +1183,15 @@ Public Class Camera
TL.LogMessage("ImageArrayVariant Get", "Throwing InvalidOperationException because of a call to ImageArrayVariant before the first image has been taken!")
Throw New ASCOM.InvalidOperationException("Call to ImageArrayVariant before the first image has been taken!")
End If

CurrentState = CameraStates.cameraDownload
ReDim cameraImageArrayVariant(cameraNumX - 1, cameraNumY - 1)
For i As Integer = 0 To cameraNumY - 1
For j As Integer = 0 To cameraNumX - 1
cameraImageArrayVariant(j, i) = cameraImageArray(j, i)
Next
Next
TL.LogMessage("ImageArray Variant Get", "getting the Array Variant")
CurrentState = CameraStates.cameraIdle
Return cameraImageArrayVariant
End Get
End Property
Expand Down Expand Up @@ -1478,6 +1482,7 @@ Public Class Camera
If (cameraStartX > ccdWidth) Then Throw New InvalidValueException("StartExposure", cameraStartX.ToString(), ccdWidth.ToString())
If (cameraStartY > ccdHeight) Then Throw New InvalidValueException("StartExposure", cameraStartY.ToString(), ccdHeight.ToString())

cameraImageReady = False
cameraLastExposureDuration = Duration
exposureStart = DateTime.Now
SendLumixMessage(RECMODE) 'makes sure it is not in playmode...
Expand Down Expand Up @@ -1628,7 +1633,7 @@ Public Class Camera
End If

SendLumixMessage(PLAYMODE) 'making sure the camera is in Playmode
CurrentState = CameraStates.cameraDownload
CurrentState = CameraStates.cameraReading
CurrentPercentCompleted = 0

nRead = 0
Expand Down
4 changes: 2 additions & 2 deletions LumixCamera/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:

<Assembly: AssemblyVersion("7.0.6")>
<Assembly: AssemblyFileVersion("7.0.6.0")>
<Assembly: AssemblyVersion("7.1.0")>
<Assembly: AssemblyFileVersion("7.1.0.0")>

0 comments on commit b4c9b62

Please sign in to comment.