×
INDI Library v1.8.4 Released

Minor bugfix release with some highlights:

Help with DIY CCD driver

3 years 8 months ago
Gilles
Expert Boarder
Expert Boarder
Posts: 141
Karma: 2
More
Topic Author
Help with DIY CCD driver #9332
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

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

3 years 8 months ago
knro
Administrator
Administrator
Posts: 7754
Karma: 51
Help with DIY CCD driver #9335
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

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

3 years 8 months ago
Gilles
Expert Boarder
Expert Boarder
Posts: 141
Karma: 2
More
Topic Author
Help with DIY CCD driver #9336
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...

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

3 years 8 months ago
knro
Administrator
Administrator
Posts: 7754
Karma: 51
Help with DIY CCD driver #9338
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

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

3 years 8 months ago
Gilles
Expert Boarder
Expert Boarder
Posts: 141
Karma: 2
More
Topic Author
Help with DIY CCD driver #9339
:blink:
it's 16 bits
i think i'm lost here
will try with unsigned short

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

3 years 8 months ago
knro
Administrator
Administrator
Posts: 7754
Karma: 51
Help with DIY CCD driver #9340
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

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

3 years 8 months ago 3 years 8 months ago by Gilles.
Gilles
Expert Boarder
Expert Boarder
Posts: 141
Karma: 2
More
Topic Author
Help with DIY CCD driver #9342
okay, let's go :
the original project is here : http://astroccd.org/
and there is this really long thread :
http://www.cloudynights.com/topic/497530-diy-astro-ccd-16-bit-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 :
https://github.com/vakulenko/CAM8_software

So, here is my attempt :
https://github.com/gehelem/indi_cam84_ccd

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

3 years 5 months ago
Gilles
Expert Boarder
Expert Boarder
Posts: 141
Karma: 2
More
Topic Author
Help with DIY CCD driver #11502
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 knro

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

3 years 5 months ago
knro
Administrator
Administrator
Posts: 7754
Karma: 51
Help with DIY CCD driver #11503
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

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

3 years 5 months ago 3 years 5 months ago by Gilles.
Gilles
Expert Boarder
Expert Boarder
Posts: 141
Karma: 2
More
Topic Author
Help with DIY CCD driver #11516
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.

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

3 years 5 months ago
knro
Administrator
Administrator
Posts: 7754
Karma: 51
Help with DIY CCD driver #11519
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

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

3 years 4 months ago
Gilles
Expert Boarder
Expert Boarder
Posts: 141
Karma: 2
More
Topic Author
Help with DIY CCD driver #11849
:) 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"

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

Time to create page: 0.239 seconds