×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Help with DIY CCD driver

  • Posts: 154
  • Thank you received: 51
hi

i'm trying to write my own driver for my diy camera.
it's based on CCD template, but i'm stuck with C stuff, i'm sure it will make laugh all C gurus
My library provides a function that returns a pointer to a buffer containing my frame (cameraGetImage())
I don't know how to return back my image to Indi in function grabImage() :
     long unsigned int *image;
     image = (long unsigned int *) PrimaryCCD.getFrameBuffer();
     image = cameraGetImage();

i've tried to read other 3rdparty driver, but i don't understand as a noob that i am...
I would respectfully appreciate any advice !

Gilles
6 years 2 months ago #9332

Please Log in or Create an account to join the conversation.

yeah this won't work. You can use PrimaryCCD.setFrameBuffer(cameraGetImage()). Is there documentation to the API you're using?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 2 months ago #9335

Please Log in or Create an account to join the conversation.

  • Posts: 154
  • Thank you received: 51

Replied by gehelem on topic Help with DIY CCD driver

there is no documentation, it's homemade...
in my library, i fill my frame in a buffer :
static unsigned int bufim[3000][2000];
My function cameraGetimage() simply returns a pointer to this buffer :
unsigned int * cameraGetImage();
{
  return *bufim;
}
(i've changed my definitions since last post : it is now a unsigned int instead of a long unsigned int)

...thank for your help...
6 years 2 months ago #9336

Please Log in or Create an account to join the conversation.

Why is it unsigned int? Is your camera depth 32 bits per pixel?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 2 months ago #9338

Please Log in or Create an account to join the conversation.

  • Posts: 154
  • Thank you received: 51

Replied by gehelem on topic Help with DIY CCD driver

:blink:
it's 16 bits
i think i'm lost here
will try with unsigned short
6 years 2 months ago #9339

Please Log in or Create an account to join the conversation.

Please try to put your driver somewhere like Github so at least we can see the code and could comment on it.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 2 months ago #9340

Please Log in or Create an account to join the conversation.

  • Posts: 154
  • Thank you received: 51

Replied by gehelem on topic Help with DIY CCD driver

okay, let's go :
the original project is here : astroccd.org/
and there is this really long thread :
www.cloudynights.com/topic/497530-diy-as...t-color-6mpx-camera/
it's a DIY CCD Camera based on Nikon D40/50/70 CCD chip
It works really well.
But : for now, the code is written in Delphi, and works with ASCOM pilots
i'm just trying to translate in C the Delphi library found here :
github.com/vakulenko/CAM8_software

So, here is my attempt :
github.com/gehelem/indi_cam84_ccd
Last edit: 6 years 2 months ago by gehelem.
6 years 2 months ago #9342

Please Log in or Create an account to join the conversation.

  • Posts: 154
  • Thank you received: 51

Replied by gehelem on topic Help with DIY CCD driver

for the record :
my ugly driver is working now, anyone interested ?
(this cam84 is really an interesting project, now followed by a new version Cam86)
Gilles.
The following user(s) said Thank You: Jasem Mutlaq
5 years 11 months ago #11502

Please Log in or Create an account to join the conversation.

Great news! Can you write a detailed article on it so we can publish? I'm sure there are some out there who love DIY solutions!
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
5 years 11 months ago #11503

Please Log in or Create an account to join the conversation.

  • Posts: 154
  • Thank you received: 51

Replied by gehelem on topic Help with DIY CCD driver

Of course with pleasure, (tell me how)
But first i'll need a few more weeks to clean and improve my code :
-framing not tested
-binning not tested
-need to understand how to render bayer matrix
-real sky tests !
I also want to test on raspberry, Odroic C2 & XU4 (i have one of each) :
The use of FTDI D2XX driver forces to unload modules ftdi_sio and usbserial, which prevents to use the majority of USB serial converters...
This is a big disadvantage we can solve chaining indi servers
Gilles.
Last edit: 5 years 11 months ago by gehelem.
5 years 11 months ago #11516

Please Log in or Create an account to join the conversation.

Yes please have your driver somewhat production-ready first and the FTDI problem is a show stopper for most users since it would break their device connections, so try to figure out a clean solution.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
5 years 11 months ago #11519

Please Log in or Create an account to join the conversation.

  • Posts: 154
  • Thank you received: 51

Replied by gehelem on topic Help with DIY CCD driver

:) One step forward :
I've updated the code to use libftdi instead of D2XX -> now i can keep the usage of serial adapters
:( One step backward :
i have now troubles to synchronise writes and reads of ft2232 with libftdi, images are degraded
i think timings ar different between D2XX and libftdi, i have to investigate...
"stay tunned"
5 years 10 months ago #11849

Please Log in or Create an account to join the conversation.

Time to create page: 0.210 seconds