Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
$assets = New-Item -ItemType Directory -Path 'release-assets'
Copy-Item $dll.FullName $package.FullName
Copy-Item 'LICENSE.txt', 'INSTALLATION.md' $package.FullName
"Original author: Doug Henderson`nMaintained by: Lucas Lepski and contributors`nLicense: MPL-2.0`nSource: https://github.com/$env:GITHUB_REPOSITORY/tree/$env:GITHUB_SHA`nBuild: https://github.com/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID`n" | Set-Content "$package/SOURCE.txt" -Encoding utf8
"Original author: @dougforpres`nMaintained by: @shurkanTwo and contributors`nLicense: MPL-2.0`nSource: https://github.com/$env:GITHUB_REPOSITORY/tree/$env:GITHUB_SHA`nBuild: https://github.com/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID`n" | Set-Content "$package/SOURCE.txt" -Encoding utf8
Compress-Archive -Path "$package/*" -DestinationPath "$assets/SonyCameraPlugin-$version.zip"
Copy-Item $dll.FullName $assets.FullName
$hashes = Get-ChildItem $assets.FullName -File | Sort-Object Name | ForEach-Object {
Expand Down
31 changes: 20 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
# Sony Camera Plugin

## 1.0.0.6 — corrective community preview
## 1.0.0.7 — exposure error classification and release maintenance

Follow-up to the 1.0.0.5 audit, retaining all previously integrated contributions and Doug Henderson's original authorship. Install manually using [INSTALLATION.md](INSTALLATION.md).
- Use GitHub handles in plugin descriptions, author/contributor display metadata and the packaged source notice. Preserve the original copyright notice and commit authorship.
- Correct README version, release status and installation links; retain the explicit limits of automated testing and manual distribution.
- Report a rejected busy capture-start through NINA's CameraExposureFailedException path, preserving the original message and cause. This avoids the duplicate generic-error notification path in NINA 3.2 while retaining capture rejection, prior cancellation and the existing soft-abort warning. Actual UI confirmation is still needed for the full popup report in this fork's issue #5.
- Publish a fresh versioned build; older release assets and checksums remain intact.

See [the session review](docs/SESSION-REVIEW-1.0.0.7.md) and [manual installation/rollback](INSTALLATION.md). Physical camera/USB/MTP, LiveView, lens operation and complete Sky Flat behavior remain unverified. NINA's plugin manager still uses the upstream release source.

## 1.0.0.6 — corrective community release

Follow-up to the 1.0.0.5 audit, retaining all previously integrated contributions and @dougforpres's original authorship. Install manually using [INSTALLATION.md](INSTALLATION.md).

- Preserve aborts received during capture-start preflight. An aborted pending start cannot launch an exposure after its status check returns; a rejected busy start preserves cancellation of the preceding capture.
- Verify the specific nearest learnt shutter step using the native driver's float rounding and absolute-distance selection, replacing the broad ratio that accepted a stalled adjacent speed.
- Retry a valid previous Bulb readback when switching to a short numeric exposure. Malformed readbacks still fail, and a persistent mismatch cannot start capture.
- Restore the repeated-failure camera-loss protection adapted from Robert Hasson's upstream #13: three consecutive qualifying native errors mark the camera disconnected and block all further native access until NINA restarts. Never-working properties, explicit unsupported results, lock contention and shutter-verification mismatches do not count. A successful camera operation resets the count. No native close, retry or automatic reconnection is attempted after the guard trips.
- Restore the repeated-failure camera-loss protection adapted from @totoantibes's upstream #13: three consecutive qualifying native errors mark the camera disconnected and block all further native access until NINA restarts. Never-working properties, explicit unsupported results, lock contention and shutter-verification mismatches do not count. A successful camera operation resets the count. No native close, retry or automatic reconnection is attempted after the guard trips.
- Add regression coverage using the production capture controller and managed native wrappers, replacing only native delegates and NINA logging/notifications for portable tests.

See [the corrective review](docs/RELEASE-REVIEW-1.0.0.6.md). Physical camera/USB operation remains unverified; this is a prerelease for manual testing and is not distributed through NINA's plugin manager.
See [the corrective review](docs/RELEASE-REVIEW-1.0.0.6.md). Physical camera/USB operation remains unverified. This was published first as a preview and subsequently marked regular/Latest without changing the binaries; updates are installed manually.

## 1.0.0.5 — community preview

First maintained release from [Lucas Lepski’s fork](https://github.com/shurkanTwo/NINASonyCameraPlugin), preserving Doug Henderson’s original authorship and MPL-2.0. Install manually using [INSTALLATION.md](INSTALLATION.md). This preview is not distributed through NINA’s plugin manager.
First maintained release from [@shurkanTwo’s fork](https://github.com/shurkanTwo/NINASonyCameraPlugin), preserving @dougforpres’s original authorship and MPL-2.0. Install manually using [INSTALLATION.md](INSTALLATION.md). This preview is not distributed through NINA’s plugin manager.

- Integrate current capture start/abort coordination and an opt-in managed Sony camera simulator with full-plugin integration tests (Lucas Lepski, upstream #10/#15).
- Report the latest downloaded ARW’s Sony camera temperature in NINA and that image’s metadata; missing readings remain unavailable (Lucas Lepski, #18 / issue #1).
- Release native image and metadata allocations after copying, including error paths, avoiding a per-frame unmanaged memory leak (Robert Hasson, #14).
- Retry and verify shutter changes for back-to-back exposures. A readable shutter mismatch now fails before capture rather than silently using the previous exposure. Exclude AUTO/Multi Frame NR from gain choices and fix native driver version comparisons (adapted from Robert Hasson’s #13 / issue #5).
- Integrate current capture start/abort coordination and an opt-in managed Sony camera simulator with full-plugin integration tests (@shurkanTwo, upstream #10/#15).
- Report the latest downloaded ARW’s Sony camera temperature in NINA and that image’s metadata; missing readings remain unavailable (@shurkanTwo, #18 / issue #1).
- Release native image and metadata allocations after copying, including error paths, avoiding a per-frame unmanaged memory leak (@totoantibes, #14).
- Retry and verify shutter changes for back-to-back exposures. A readable shutter mismatch now fails before capture rather than silently using the previous exposure. Exclude AUTO/Multi Frame NR from gain choices and fix native driver version comparisons (adapted from @totoantibes’s #13 / issue #5).
- Serialize native camera/lens calls with bounded waits. Execution timeout blocks further native access until NINA restarts. Keep native cancellation off by default and always soft-cancel during image readout/processing (adapted #13, preserving current #10 safeguards / issue #4).
- Return focuser capability information without throwing (Christian Palm, #11), improve focuser state cleanup and notifications (Robert Hasson, #13).
- Document lens-learning tools and camera SD-card saving (Lucas Lepski, #16/#17 / issues #9/#3).
- Return focuser capability information without throwing (@christian-photo, #11), improve focuser state cleanup and notifications (@totoantibes, #13).
- Document lens-learning tools and camera SD-card saving (@shurkanTwo, #16/#17 / issues #9/#3).
- Add Windows-tested manual-install ZIP/DLL packaging, checksums, source/build provenance, and installation/rollback instructions.

Reviewed but deferred: experimental USB auto-reconnection, retrying a still-running timed-out native call, forced cancellation after repeated busy starts, and closed WIP #12 video intervals. Existing NINA 3.2/empty-ISO fixes from 1.0.0.4 (including @naixx’s contribution) remain included. See the [full review and issue coverage](docs/UPSTREAM-REVIEW-1.0.0.5.md).
Expand Down
3 changes: 2 additions & 1 deletion Drivers/CameraDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using NINA.Core.Utility;
using NINA.Core.Utility.Notification;
using NINA.Equipment.Interfaces;
using NINA.Equipment.Exceptions;
using NINA.Equipment.Interfaces.Mediator;
using NINA.Equipment.Model;
using NINA.Equipment.SDK.CameraSDKs.ASTPANSDK;
Expand Down Expand Up @@ -557,7 +558,7 @@ public void StartExposure(CaptureSequence sequence) {
_capture.Start((float)sequence.ExposureTime);
} catch (InvalidOperationException ex) {
Logger.Warning(ex.Message);
throw new SonyException(ex.Message);
throw new CameraExposureFailedException(ex.Message, ex);
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

These instructions install the community-maintained build from
[shurkanTwo/NINASonyCameraPlugin](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases).
The original plugin was developed by **Doug Henderson**. This fork is maintained
by **Lucas Lepski and contributors** while shared upstream maintenance is being discussed.
The original plugin was developed by **@dougforpres**. This fork is maintained
by **@shurkanTwo and contributors** while shared upstream maintenance is being discussed.

The current community release, **1.0.0.6**, is a preview for manual testing. Windows
builds and automated tests are checked; physical Sony camera/USB operation has
not been verified for this combined release. See the release notes for scope.
The current community release, **1.0.0.7**, is a regular GitHub release marked Latest.
Windows builds and automated tests are checked; physical Sony camera/USB operation
remains unverified for this combined release. See the release notes for scope.

## Requirements

Expand All @@ -17,7 +17,7 @@ not been verified for this combined release. See the release notes for scope.

## Install or replace an existing version

1. Download **`SonyCameraPlugin-1.0.0.6.zip`** from the [1.0.0.6 release](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases/tag/1.0.0.6). Choose the release asset, rather than GitHub's automatic “Source code” archives. Extract it to a temporary folder. The plugin is `NINA.RetroKiwi.Plugin.SonyCamera.dll`.
1. Download **`SonyCameraPlugin-1.0.0.7.zip`** from the [1.0.0.7 release](https://github.com/shurkanTwo/NINASonyCameraPlugin/releases/tag/1.0.0.7). Choose the release asset, rather than GitHub's automatic “Source code” archives. Extract it to a temporary folder. The plugin is `NINA.RetroKiwi.Plugin.SonyCamera.dll`.
2. Disconnect the camera and focuser in NINA, then **close every NINA window** before changing plugin files.
3. Press **Win+R**, enter `%LOCALAPPDATA%\NINA\Plugins`, and open the plugin-version folder used by your NINA installation. NINA 3.x installations commonly use **`3.0.0`**: this folder tracks plugin compatibility, so it need not match the NINA version in About. If several version folders exist, use the one in NINA's startup log (`%LOCALAPPDATA%\NINA\Logs`); look for the path from which the Sony plugin was loaded.
4. If Sony Camera Plugin is already installed, locate its existing `NINA.RetroKiwi.Plugin.SonyCamera.dll` and copy the entire containing plugin folder **outside `%LOCALAPPDATA%\NINA\Plugins`** as a backup. Replace the DLL **in that existing folder**, even if the folder name differs from the example. Do not create another plugin folder containing a second copy. Keep the rest of the existing folder's files.
Expand All @@ -29,7 +29,7 @@ not been verified for this combined release. See the release notes for scope.

6. Copy the extracted DLL into the existing or newly created folder. The ZIP also contains the license, source reference, and these instructions; you can keep those files alongside it. It contains no replacement NINA runtime libraries or native Sony driver.
7. If Windows shows an **Unblock** checkbox in the downloaded ZIP or DLL's Properties, unblock the file. Alternatively run `Unblock-File` in PowerShell on that downloaded ZIP/DLL before copying/extracting it.
8. Restart NINA. In its plugin manager, confirm **Sony Camera Plugin 1.0.0.6** is loaded; the description identifies the community-maintained build. Select the Sony camera in Equipment and connect it.
8. Restart NINA. In its plugin manager, confirm **Sony Camera Plugin 1.0.0.7** is loaded; the description identifies the community-maintained build. Select the Sony camera in Equipment and connect it.
9. Leave **Enable native cancel** disabled initially. Try one short exposure and check the downloaded image, ISO and exposure before using the build for a sequence. Temperature appears only after downloading an ARW that contains a supported Sony temperature reading.

This is a replacement for the upstream plugin, with the same identifier so existing
Expand All @@ -45,7 +45,7 @@ The release includes **`SHA256SUMS.txt`** for its ZIP and standalone DLL. In
PowerShell, calculate a downloaded file's hash and compare it to the matching entry:

```powershell
Get-FileHash "$env:USERPROFILE\Downloads\SonyCameraPlugin-1.0.0.6.zip" -Algorithm SHA256
Get-FileHash "$env:USERPROFILE\Downloads\SonyCameraPlugin-1.0.0.7.zip" -Algorithm SHA256
```

## Roll back
Expand Down
18 changes: 9 additions & 9 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@

// [MANDATORY] The assembly versioning
//Should be incremented for each new release build of a plugin
[assembly: AssemblyVersion("1.0.0.6")]
[assembly: AssemblyFileVersion("1.0.0.6")]
[assembly: AssemblyVersion("1.0.0.7")]
[assembly: AssemblyFileVersion("1.0.0.7")]

// [MANDATORY] The name of your plugin
[assembly: AssemblyTitle("Sony Camera Plugin")]
// [MANDATORY] A short description of your plugin
[assembly: AssemblyDescription("Community-maintained Sony camera and lens support; originally developed by Doug Henderson")]
[assembly: AssemblyDescription("Community-maintained Sony camera and lens support; originally developed by @dougforpres")]

// The following attributes are not required for the plugin per se, but are required by the official manifest meta data

// Your name
[assembly: AssemblyCompany("Doug Henderson")]
[assembly: AssemblyCompany("@dougforpres")]
// The product name that this plugin is part of
[assembly: AssemblyProduct("Sony Camera Plugin")]
[assembly: AssemblyCopyright("Copyright © 2023-2024 Doug Henderson")]
Expand Down Expand Up @@ -52,7 +52,7 @@
//[Optional] An additional url to an example example screenshot of your plugin in action
[assembly: AssemblyMetadata("AltScreenshotURL", "")]
//[Optional] An in-depth description of your plugin
[assembly: AssemblyMetadata("LongDescription", @"Community-maintained fork of [Doug Henderson’s original plugin](https://github.com/dougforpres/NINASonyCameraPlugin), maintained by Lucas Lepski and contributors.
[assembly: AssemblyMetadata("LongDescription", @"Community-maintained fork of [@dougforpres’s original plugin](https://github.com/dougforpres/NINASonyCameraPlugin), maintained by @shurkanTwo and contributors.

[Manual installation](https://github.com/shurkanTwo/NINASonyCameraPlugin/blob/master/INSTALLATION.md).

Expand All @@ -69,7 +69,7 @@ [Manual installation](https://github.com/shurkanTwo/NINASonyCameraPlugin/blob/ma
*Note*: This addon uses the core (non-ASCOM) files present in the Sony ASCOM driver v1.0.1.17 and later, which must be installed for this addon to start up correctly. You can find the Sony ASCOM driver at [https://github.com/dougforpres/ASCOMSonyCameraDriver/releases](https://github.com/dougforpres/ASCOMSonyCameraDriver/releases).

## Support
Report problems with this fork in [its issue tracker](https://github.com/shurkanTwo/NINASonyCameraPlugin/issues). Doug Henderson remains the original author; his homepage is [retro.kiwi](https://retro.kiwi).
Report problems with this fork in [its issue tracker](https://github.com/shurkanTwo/NINASonyCameraPlugin/issues). @dougforpres remains the original author; his homepage is [retro.kiwi](https://retro.kiwi).

For many bugs/problems I'm going to ask you for a driver log file, [here's a link to how you would do that](https://github.com/dougforpres/ASCOMSonyCameraDriver/wiki/Troubleshooting#the-driver-dll-log).

Expand All @@ -78,9 +78,9 @@ [Manual installation](https://github.com/shurkanTwo/NINASonyCameraPlugin/blob/ma
* [Other known issues](https://github.com/dougforpres/ASCOMSonyCameraDriver/wiki/Troubleshooting)

## Contributors
* Lucas Lepski [@ShurkanTwo](https://github.com/shurkanTwo)
* Robert Hasson [@totoantibes](https://github.com/totoantibes)
* Christian Palm [@christian-photo](https://github.com/christian-photo)
* [@shurkanTwo](https://github.com/shurkanTwo)
* [@totoantibes](https://github.com/totoantibes)
* [@christian-photo](https://github.com/christian-photo)
* [@naixx](https://github.com/naixx)
")]

Expand Down
Loading