Thanks for the test Bernd. I have started to investigate this a bit deeper, The problem seems to be following:
When the driver ist started it enummerates all Touptec and Touptec OEM Cameras.
For each camera it creates a new instance of ToupBase and stores the information from the enummeration process (m_Instance) that is needed to open the camera with the Touptec library.
When the camera is unplugged and reconncted some USB parameters change. I am not an USB expert... but I think it is the USB bus number.
When the user disconnect the driver, unplug and plug in the camera and reconnect the driver the connect inforation for the Touptec library is no longer valid and the driver is not working correctly. This causes a crash of the driver
What I have done is to enummerate the cameras when the user reconnects the driver after the initial connect.
you can find this code here: github.com/42-max/indi-3rdparty/tree/ReconnectTests
This code works fine for me but the solution has still some problems:
Maybe I found another instability... not sure if it is only on my RPi4 setup present
Sometimes I want to disconnect the camera from USB and power after I have started kstars, ekos and the camera driver e.g. to clean something or to install a filter...
So I disconnect the camera in the indi control panel, disconnect USB, reconnect USB and connect the camera in the indi control panel. After connect the driver crashes.
Could anybody make test this. If this is a common behaviour I may have a solution.
I had the same problems. There are some changes in the indi-toupbase driver ongoing. I have proposed a reset of the download estimation time after a change of the ROI that solved some issues. I have seen that user wlatanowicz has also made a proposal to overcome timeout problems. I think these changes will be deployed soon.
I just got my new Omegon veTec 571 camera. As always when you get new astro stuff, the weather is bad.
So I played around with the camera exploing all the features. I found that the camera supports two different
binning modes: adding pixels and averaging pixels. This feature seems not to be implemented
in the INDI 3rd party driver. I had a look into the code and found a TODO comment. As I always wanted to learn
how to contribute to this outstanding project I started to implement a control for this feature.
Just for fun... and to be honest... I didn't really miss this feature
But I think it is working now... if there is someone interested to test this I have forked
the repo to:
The code adds a "Binnig Mode" control to the "Image Settings" Tab in the Indi Control Window.
If AVG is selected Binning will be calculated as an average by the camera.
If Add is selected the pixels will added as usual.
I have tested this code with a Touptek 2600 Mono and the Omegon veTec 571 color.
The driver supports many other cameras that are similar to the Touptek. There may be additional checks
in the code necessary to deal with other cameras.
Not sure if the coding is consistent with the "best practices" of this project.
I was not able to activate DEBUG logs. So I have added ERROR logs to the critical sections of the code.
This shall be fiexed.
Please post your comments if you like. I would be happy if I can contribute to this project...
I have added the default value setting of m_DownloadEstimation in indi_toupbase.cpp
from line 2063 you shoud find this code
HRESULT rc = FP(put_Roi(m_CameraHandle, x, y, w, h));
LOGF_ERROR("Error setting camera ROI: %d", rc);
I have added this line.
m_DownloadEstimation = 10000.0; // set Download Estimation to default value --> this value will be adapted when the next frame was downloaded
I still try to get familiar with git...
I have the same issues with the subframes. After setting a ROI in the focus module the exposures for larger light frames give a time out after the subframe setting is unchecked.
I had a look into the code an found that the download estimation time is not reset when the subframe setting is unchecked. This causes a timeout for larger frames later.
I have set the download estimation time to high default value of 10s in the function that sets the ROI. The next frame will be captured without problmes. The download estimation will be adapted automatically later when new light frames are captured. I don't know if this is the best solution but it works at least.
Can anybody guide me how to make a prososal for such code changes in this project...
PS: I am testing ToupTec 2600 mono camera and RPi4