samuelpowell / Spinnaker.jl

A Julia interface to the FLIR/PointGrey Spinnaker SDK
MIT License
15 stars 7 forks source link

Add support for new Spinnaker install location on MacOS, add reset!(cam), tweak framerate!(cam) #68

Closed IanButterworth closed 3 years ago

IanButterworth commented 3 years ago

A few changes:

  1. FLIR changed the Spinnaker SDK install location in MacOS. This adds searching in that second location too. It also moves to a ref const library path so that julia doesn't need to rebuild the package if the library has moved. The cost of moving to a ref should be negligible
    
    julia> s = "hello"
    "hello"

julia> sr = Ref{String}("hello") Base.RefValue{String}("hello")

julia> @btime s * s 33.544 ns (1 allocation: 32 bytes) "hellohello"

julia> @btime sr[] * sr[] 54.121 ns (1 allocation: 32 bytes) "hellohello"



2. Adds `reset!(cam)` which immediately power cycles the camera

3. Only tries to set `AcquisitionFrameRateAuto` when setting the framerate, as some cameras don't support auto framerate
samuelpowell commented 3 years ago

Thanks @ianshmean, I have no means to test at the moment (and thus nothing to lose either). I've eyeballed the PR and it looks sane but it's up to you to confirm it works!

IanButterworth commented 3 years ago

Ok. I can confirm that it's working for me. I'll merge and release.