Making Fishcamp work on OS X and Linux

Robert Lancaster rlancaste at gmail.com
Sat Jun 23 19:07:14 UTC 2018


Hey guys,

Over the last several days, I have been testing and fixing problems with the Fishcamp Driver using the Fishcamp Starfish I borrowed from David Illig on Cloudy Nights.  When I first connected it on either Mac or Linux, it did not work at all basically.  It started to work the second time I tried to start it up on Linux, but the images came back corrupted and the driver crashed.  So then I set about debugging it and fixing it.  After about 3 days of work, I have done the following:

1.  Added more details to the debugging messages to make it easier to diagnose the errors.
2.  Fixed the Firmware loading paths to work on OS X.
3.  Fixed an issue with the firmware upload where it would not be successful due to not waiting between writes.
4.  I found that it would try to connect to the camera, then if it found a “RAW" camera it would upload the firmware but then the driver would just stop.  So you would basically have to disconnect and try to connect again.  I thought this was not useful to the users so I rewrote the code so that it would try to connect again after initializing a “RAW" camera.
5.  After I found that taking a subframe caused corrupted images, I found that there was a mistake in the updateCCDFrame command where it was supposed to get x,y,x2,y2 but it was getting x,y,w,h.  That was easily fixed.
6.  The exposure duration was off by a factor of 1000, so that a 10 second image was really 10 ms.  This was an easy fix.
7.  I found that some images were freezing the driver because of issues in the timer.  It was trying to download without checking if the camera was ready.  Sometimes the timers were negative or zero in which case the command that would check if the camera was ready was getting skipped.  This was more challenging to fix because it took awhile to find and work all the issues out.

Then I hit a snag.

If found that any image 2 seconds or less was getting corrupted on the download.  I traced this down to a function that was supposed to do a correction to the image based on the black columns around the sensor.  As written, every time it was attempted, the image would not download correctly.  But if I subframed the image, the image would download.  This leads me to believe that either the raw image size was incorrect, the camera was not being set to correctly download an image including the black columns, or maybe this camera doesn’t have black columns like others do.  Regardless it was failing and I tried several things but couldn’t get that to work.   However, I also found a flaw in the logic around the function as well.  If a subframe is taken, the pixels around the subframe will not be black columns anyway so this function should not be executed because it will not work properly.   Also logically if a user is using this camera to guide on a star, they probably will subframe the image, so you would not want this function messing up the pixel values with nonblack columns that it thinks are black.  So I disabled this function for the Starfish Camera.  If anybody else wants to take a crack at it, be my guest, but my opinion is it should be disabled.

Anyway, now the driver works very well on my Mac and it should work on Linux as well, but I will test that soon.  I also plan to test it with my Mac outside when the weather improves so that I can see how it performs on astronomical objects and with Guiding.

Thanks,

Rob





More information about the Kstars-devel mailing list