void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int num) { ISInit(); for (int i = 0; i < cameraCount; i++) { FishCampCCD *camera = cameras[i]; if (dev == nullptr || !strcmp(dev, camera->name)) { camera->ISNewSwitch(dev, name, states, names, num); if (dev != nullptr) break; } } //This turns the LibFishcamp fcusb logging on and off along with the INDI Fishcamp file logging. if (!strcmp(name, "LOG_OUTPUT")) { if(INDI::Logger::ConfigurationS[1].s == ISS_ON) { fcUsb_setLogging(true); IDLog("Setting Starfish Driver File Log On\n"); } else { fcUsb_setLogging(false); IDLog("Setting Starfish Driver File Log Off\n"); } } }
void ISInit() { static bool isInit = false; if (!isInit) { // initialize the driver framework IDLog("About to call fcUsb_init()\n"); fcUsb_init(); IDLog("About to call set logging\n"); fcUsb_setLogging(false); IDLog("About to call find Cameras\n"); cameraCount = -1; cameraCount = fcUsb_FindCameras(); if(cameraCount == -1) { IDLog("Calling FindCameras again because at least 1 RAW camera was found\n"); cameraCount = fcUsb_FindCameras(); } IDLog("Found %d fishcamp cameras.\n", cameraCount); for (int i = 0; i < cameraCount; i++) cameras[i] = new FishCampCCD(i + 1); atexit(cleanup); isInit = true; } }
void ISInit() { static bool isInit = false; if (!isInit) { // initialize the driver framework IDLog("About to call fcUsb_init()\n"); fcUsb_init(); IDLog("About to call set logging\n"); fcUsb_setLogging(true); IDLog("About to call find Cameras\n"); cameraCount = fcUsb_FindCameras(); IDLog("Found %d fishcamp cameras.\n", cameraCount); for (int i = 0; i < cameraCount; i++) cameras[i] = new FishCampCCD(i + 1); atexit(cleanup); isInit = true; } }