×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

INDI SVBONY CCD Driver Monochrome Reimplementation

  • Posts: 179
  • Thank you received: 25
Hi Jasem

This is a workaround for not being able to set GAIN.

Add the following code to the SVBONYBase::Connect function just before Line:482 /* Success! */.
It was in the SVBONYCCD::Connect function in the previous svbony_ccd.cpp.
* It is Colin's code.
    // fix for SDK gain error issue
    // set exposure time
    SVBSetControlValue(mCameraInfo.CameraID, SVB_EXPOSURE, static_cast<long>(1 * 1000000L), SVB_FALSE);

P.S.
Please also fix the grabImage call in workerExposure.
Last edit: 6 months 4 weeks ago by tkakura.
6 months 4 weeks ago #96080

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

  • Posts: 179
  • Thank you received: 25
Hi Jasem

In workerExposure "case SVB_ERROR_TIMEOUT" "delay = 100" is not correct.
A little later in the code, "usleep(delay * 1000 * 1000);" gives 100000000.
usleep only accepts values less than 100000000.
6 months 4 weeks ago #96081

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

Thank you for the testing & feedback, it's greatly appreciated! I just pushed some fixes based on your feedback, please check them out.
6 months 4 weeks ago #96082

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

  • Posts: 179
  • Thank you received: 25
Thanks for provided new code.
I checked it.

RESULT-1

GAIN can now be set before exposure.

RESULT-2

A new minor problem is detected.
When the button to stop exposure is pressed, SVB_ERROR_TIMEOUT is set in grabImage after the exposure is interrupted.
At that time, an ERROR message is displayed in the INDI control panel.

When Abort, SVBGetVideoData is called once and no message is needed even if the return value is an error.

RESULT-3

Timeouts still occur.
The SVGGetVideoData time of 100 is too short, and the retry count of 3 times when a TIMEOUT occurs is too low.
I believe that if the number of retries is to be finite, it should be at least 20. In the past, when SV905C was prone to TIMEOUT, a few retries were not enough.
I do not recommend both extending the time and increasing the number of retries in the grabImage, as this will make Abort less responsive.

It is not smart, but I have attached the code that expanded the contents of grabImage to workerExposure.
With this structure, SVGetVideoData can be stopped by Abort even if both its time is set to 1000 and the number of retries is unlimited.
Last edit: 6 months 4 weeks ago by tkakura.
6 months 4 weeks ago #96084
Attachments:

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

  • Posts: 179
  • Thank you received: 25
Hi Jasem

How about changing the following policy?

<strong>Change grabImage</strong>

Set SVBGetVideoData time to 1000.
Do not retry.
Do not display error messages.
Set the return value of SVBGetVideoData to the return value of the function.

<strong>Callers of grabImage</strong>

Display error messages according to the purpose of calling grabImage.
Retry grabImage at the caller if necessary.
Last edit: 6 months 4 weeks ago by tkakura.
6 months 4 weeks ago #96085

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

  • Posts: 179
  • Thank you received: 25
Hi Jasem,

I believe the problem can be solved by adding the SVBONYBase::workerExposure() in the source code I attached to the post #96084 and the following code for reading down the buffer in the if (isAboutToQuit) block.
    unsigned char* imageBuffer = PrimaryCCD.getFrameBuffer();
    ret = SVBGetVideoData(mCameraInfo.CameraID, imageBuffer, PrimaryCCD.getFrameBufferSize(),  1000);
    LOGF_DEBUG("Discard unretrieved exposure data: SVBGetVideoData:result=%d", status);
Last edit: 6 months 4 weeks ago by tkakura.
6 months 4 weeks ago #96087

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

How about when the buffer is too small to hold RGB image?
6 months 4 weeks ago #96090

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

  • Posts: 179
  • Thank you received: 25
Yes, you can.
It would be a good idea to have the RGB buffer available earlier in the workerExposure function.
You could use it either during Abort or when acquiring the image data after the exposure.

The previous drivers did not support RGB, even before I contributed. So there was no code for RGB,
Last edit: 6 months 4 weeks ago by tkakura.
6 months 4 weeks ago #96092

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

  • Posts: 179
  • Thank you received: 25
Hi Jasem

I tried shooting with the released 2.0.4.
When taking a picture, it often crashes.
SV405CC and SV905C are connected at the same time. The phenomenon reproduces with both cameras.

1. Start Remote Profile
2. Launch KStars.
3. Start & Connect Profile.
4. Start Exposure on Ekos Capture module. Do not change any settings before the start of the exposure.
5. Clash.

Indiserver is running on StellarMate OS / Raspberry PI 4B

Below is a log of the area where the crash is occurring.
[2023-10-01T12:30:56.384 東京 (標準時) INFO ][           org.kde.kstars.indi] - SVBONY CCD SV905C :  "[ERROR] CCD_CAPTURE_FORMAT: newSwitchVector with no valid members "
[2023-10-01T12:30:56.384 東京 (標準時) INFO ][           org.kde.kstars.indi] - SVBONY CCD SV905C :  "[INFO] Device configuration applied. "
[2023-10-01T12:30:56.475 東京 (標準時) INFO ][           org.kde.kstars.ekos] - "Guider port from SVBONY CCD SV905C is ready."
[2023-10-01T12:30:56.476 東京 (標準時) INFO ][           org.kde.kstars.ekos] - "SVBONY CCD SV905C is online."
[2023-10-01T12:30:56.477 東京 (標準時) INFO ][           org.kde.kstars.ekos] - "SVBONY CCD SV905C" is connected and ready.
[2023-10-01T12:30:56.507 東京 (標準時) INFO ][           org.kde.kstars.ekos] - "SVBONY CCD SV405CC is online."
[2023-10-01T12:31:03.112 東京 (標準時) DEBG ][   org.kde.kstars.ekos.capture] - Preparing capture job "" for execution.
[2023-10-01T12:31:03.114 東京 (標準時) INFO ][   org.kde.kstars.ekos.capture] - "Capturing 1.000-second  image..."
[2023-10-01T12:31:04.245 東京 (標準時) DEBG ][           org.kde.kstars.indi] - Removing device "SVBONY CCD SV405CC"
[2023-10-01T12:31:04.245 東京 (標準時) DEBG ][           org.kde.kstars.indi] - INDIListener: Removing device "SVBONY CCD SV405CC"
[2023-10-01T12:31:04.245 東京 (標準時) INFO ][           org.kde.kstars.ekos] - "SVBONY CCD SV405CC is offline."
[2023-10-01T12:31:04.293 東京 (標準時) DEBG ][           org.kde.kstars.indi] - Removing device "SVBONY CCD SV905C"
[2023-10-01T12:31:04.294 東京 (標準時) DEBG ][           org.kde.kstars.indi] - INDIListener: Removing device "SVBONY CCD SV905C"
[2023-10-01T12:31:04.295 東京 (標準時) INFO ][           org.kde.kstars.ekos] - "SVBONY CCD SV905C is offline."
Last edit: 6 months 4 weeks ago by tkakura.
6 months 4 weeks ago #96102
Attachments:

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

Try remove ~/.indi/SVBOny* and then see if that improves the situation?
6 months 4 weeks ago #96105

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

  • Posts: 179
  • Thank you received: 25
It reproduces even if they are removed.

Another point about TIMEOUT of SVBGetVideoData

TIMEOUT still occurs occasionally.
Seems to be a few retries.
I will fix it my way so please don't touch it there.
Last edit: 6 months 4 weeks ago by tkakura.
6 months 4 weeks ago #96107

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

Ok if you can figure out what's causing this (it didn't crash on me with 305Pro) please submit a PR to INDI 3rd party repository.
6 months 4 weeks ago #96109

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

Time to create page: 1.005 seconds