Skip to content

Fix the issues found in the review of the 2026 changes (1.4.0.0) - #6

Merged
dansleboby merged 2 commits into
mainfrom
fix/review-2026
Sep 30, 2026
Merged

dansleboby merged 2 commits into
mainfrom
fix/review-2026

Conversation

@dansleboby

Copy link
Copy Markdown
Owner

Review of v1.1.0.0 to v1.3.0.0 against the EDSDK 13.20.21 package (headers, API reference, samples), then fixes. Bumps the version to 1.4.0.0.

Review summary

  • The DLLs are byte-identical to EDSDK_64/Dll of the SDK. Every constant, signature and structure the application uses matches the headers.
  • The value tables (ISO, aperture, shutter speed, exposure compensation, white balance, AE modes) match the API reference.
  • The SDK sequences follow the reference: init/terminate, callbacks on the session thread, private properties, transfers, shutter, flash with UI lock, live view.

Fixes

Camera and settings

  • Exposure compensation can be set in M when ISO is Auto (the reference predates it; the camera allows it).
  • Aperture and shutter speed labels shared by a 1/2 and a 1/3 stop value resolve to the value the camera accepts. The f/4.5 labels were inverted and now follow the other pairs.
  • exposureCompensation added to GET/POST /settings. POST now refuses unknown fields.
  • POST /flash waits for a capture in progress.
  • A capture cancelled by the client can no longer answer the next one.

API and hosting

  • appsettings.Local.json holds the operator settings. It is never shipped, so automatic updates stop resetting them.
  • Canon:CaptureFileTypes could not exclude jpg: the configuration binder appended the configured types to the ["jpg"] default.
  • An open /videostream delayed the shutdown by 30 s. /liveview could serve stale frames.
  • Settings and logs are next to the executable. Logging:LogLevel is applied to Serilog.
  • Retry-After is exposed through CORS.
  • OpenAPI response metadata fixed.
  • The update exit handler is simplified: the check runs before the server starts.

Wrapper and tests

  • Unused EDSDK declarations aligned with the headers.
  • New Canon.API.Tests project, run by CI, the release workflow and the Dockerfile.
  • Ineffective or timing-dependent tests reworked.

Testing

  • dotnet build CanonSDK.sln: no warnings.
  • dotnet test CanonSDK.sln: 142 tests pass, run 3 times on Linux (.NET 10 SDK container).
  • The reworked live view test fails when the regression it targets is reintroduced.
  • dotnet publish -r win-x64: appsettings.Local.json is not published.
  • docs/openapi.json was edited by hand, because it cannot be regenerated on Linux.
  • Not tested with a camera or on Windows. On a photo booth, check:
    • settings read next to the executable;
    • the automatic update;
    • exposure compensation in M with ISO Auto on the R100.

Upgrade note

This update resets appsettings.json one last time: move customized settings to appsettings.Local.json.

🤖 Generated with Claude Code

dansleboby and others added 2 commits September 30, 2026 15:27
Review of v1.1.0.0 to v1.3.0.0 against the EDSDK 13.20.21 headers, API
reference and samples.

Camera and settings:
- Exposure compensation is settable in M when ISO is Auto.
- Aperture and shutter speed labels shared by a 1/2 and a 1/3 stop value
  resolve to the value the camera accepts; f/4.5 labels follow the other
  pairs.
- GET/POST /settings include exposureCompensation; POST refuses unknown
  fields.
- POST /flash waits for a capture in progress.
- A capture cancelled by the client marks its late file as stale.

API and hosting:
- Operator settings go in appsettings.Local.json, never shipped, so
  automatic updates no longer overwrite them.
- Canon:CaptureFileTypes defaults to empty: the binder appended the
  configured types to ["jpg"].
- /videostream ends when the application stops instead of delaying the
  shutdown by 30 s.
- /liveview no longer serves stale frames.
- Content root and log file next to the executable; Logging:LogLevel
  applied to Serilog; Retry-After exposed through CORS; OpenAPI response
  metadata fixed; update exit handler simplified (the check runs before
  the server starts).

Wrapper and tests:
- Unused EDSDK declarations aligned with the headers (EdsWrite,
  EdsCreateFileStreamEx, EdsSetFramePoint, FocusShiftSetting,
  EdsManualWBData).
- New Canon.API.Tests project (linked sources, runs on Linux), run by CI,
  release workflow and Dockerfile; ineffective or timing-dependent tests
  reworked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dansleboby
dansleboby merged commit 127438a into main Sep 30, 2026
1 check passed
@dansleboby
dansleboby deleted the fix/review-2026 branch October 4, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant