New ASCOM Alpaca Camera

Post Reply
ianmcass
Posts: 3
Joined: Thu Jul 13, 2023 3:32 pm

New ASCOM Alpaca Camera

#1

Post by ianmcass »

Hi,

I've written a new ASCOM Alpaca driver for a Raspberry Pi camera and it works fine in ASCOM Conform, CCD-Ciel, NINA, and PHD2, yet Sharpcap doesn't want to show an image.

The log files say:-

Info 16:38:31.893668 #1 Starting preview on Raspberry Pi Camera [IMX477] in void SharpCap.MultiCaptureProvider.StartPreview()
Info 16:38:31.899698 #1 Started void SharpCap.Base.CaptureProviderBase<T>.StartPreview() in void SharpCap.Base.CaptureProviderBase<T>.StartPreview()
Info 16:38:31.925685 #1 Starting Preview on Raspberry Pi Camera [IMX477], 2028x1520, Bayer_BGGR, 16bits in Live mode. in void SharpCap.Base.CaptureProviderBase<T>.StartPreview()
...
Warning 16:38:47.663686 #38 Dropping frame due to pixel count mismatch - 2d source array, source had 3082560 pixels, dest 1 in bool SharpCap.Cameras.ASCOM.NewCameraProxy.ValidateDataSize(Array source, BufferFrame target)

However, the pixel count that it reports in the logs is correct for the resolution & binning mode. How can debug this further?

Thanks
User avatar
admin
Site Admin
Posts: 13344
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: New ASCOM Alpaca Camera

#2

Post by admin »

Hi,

from the log message, it looks like the buffer received is the desired size, but SharpCap is expecting a frame of 1 pixel (1x1)!

Is it possible that the CameraXSize and CameraYSize properties are returning 1 from your driver? SharpCap checks those and will not try to set up the camera to run at a resolution that exceeds those properties, so if both return 1, SharpCap will set NumX and NumY to 1 and expect a 1x1 frame.

Alternatively, does the driver respect the settings of the NumX and NumY properties, and do they read back the values written to them? SharpCap will set these properties as part of camera setup, then read them back to check that the driver hasn't 'helpfully' changed them, so if those are not operating as expected then that could explain it.

Hope this helps, if not, maybe turn on the additional logging of camera hardware communications in SharpCap (Logging tab of the settings). This logs pretty much every bit of communications over ASCOM, so you will be able to see the queries SharpCap is sending and the responses received.

cheers,

Robin
ianmcass
Posts: 3
Joined: Thu Jul 13, 2023 3:32 pm

Re: New ASCOM Alpaca Camera

#3

Post by ianmcass »

CameraX and Y are definitely right, but NumX and Y are not yet implemented so perhaps that's it. I'll finish that code and try again.
ianmcass
Posts: 3
Joined: Thu Jul 13, 2023 3:32 pm

Re: New ASCOM Alpaca Camera

#4

Post by ianmcass »

Yes that was the issue. I've now implemented subframes and it's working great in Sharpcap. Thanks for your help in understanding this.
Post Reply