/* ----------------------------------------------------------------------- */
/* -                 Astronomical CCD Camera Control                     - */
/* -                 SBIG Camera Protocol Header File                    - */
/* ----------------------------------------------------------------------- */
/*                                                                         */
/* Copyright 2010 John Kielkopf                                            */
/* kielkopf@louisville.edu                                                 */
/*                                                                         */
/* This file is part of XmCCD.                                             */
/*                                                                         */
/* XmCCD is free software: you can redistribute it and/or modify           */
/* it under the terms of the GNU General Public License as published by    */
/* the Free Software Foundation, either version 3 of the License, or       */
/* (at your option) any later version.                                     */
/*                                                                         */
/* XmCCD is distributed in the hope that it will be useful,                */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of          */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           */
/* GNU General Public License for more details.                            */   
/*                                                                         */
/* Date: May 30, 2011                                                      */
/* Version 3.1.3                                                           */


/* Defined constants and prototypes for SBIG cameras */
/* Note assumed systemwide installation of SBIG library and header */

#include <sbigudrv.h>

/* Needed for ethernet support */
/* Default hex ip address */

#define CCD_ETH  0xc0a80001 

/* Define camera types for our own use */

#define NO_CAMERA  0xFFFF
#define SIM_CAMERA 0xFFFE
#define SBIG_STL   0xFFFB
#define SBIG_ST10  0xFFFA
#define SBIG_ST9   0xFFF9
#define SBIG_ST8   0xFFF8
#define SBIG_ST7   0xFFF7
#define SBIG       0xFFF0
#define APOGEE     0xFFE0


/* Define availability of optional internal tracking CCD's */
/* The default for standard dual CCD SBIG cameras  */

#define SELF_TRACKING 1

/* Set this high if an external tracking CCD is available */

#define SELF_EXT_TRACKING 0

/* Device status flags */

#define IDLE 0
#define INTEGRATING 1
#define COMPLETE 2

/* Filter wheel support */

#define NO_FILTER_WHEEL 0xFFFF
#define EXT_FILTER_WHEEL 0xFFFE

/* Use these for an STL camera with built-in filter wheel                  */

//#define FILTER_START 3
//#define FILTER_MAX 5
//#define FILTER_WHEEL CFWSEL_CFWL

/* Use these for an ST10 camera with CFW10 filter wheel                    */

#define FILTER_START 3                   
#define FILTER_MAX 10                    
#define FILTER_WHEEL CFWSEL_CFW10        

/* Set the filter wheel here                                               */
/* For SBIG set CFWSEL_CFW8, CFWSEL_CFW10, CFWSEL_CFWL, or CFWSEL_CFWL8    */
/* Use SBIG CFWSEL_AUTO if you feel lucky today                            */
/* If no filter wheel is present then use NO_FILTERWHEEL defined here      */
/* Note that CFWSEL_CFWL8 is new and may not work with this library        */
/* In principle other manufacturers filter wheels could be designated here */
/*   and supported within the filter routines of protocol.c                */
/* FILTERMAX should match the choice of filter wheel type                  */
/* FILTERSTART is the default startup setting                              */
/* For consistency set both to 1 if NO_FILTERWHEEL on this camera          */
/* Filter labels are set in the calling routine                            */

/* Adaptive optics suport */

#define NO_AO     0 
#define AO_STL    1
#define ADAPTIVE_OPTICS   AO_STL

/* Shutter flags */

#define LEAVE    0
#define OPEN     1
#define CLOSED   2

/* Device selection */

#define IMAGE            0
#define TRACK            1

/* Guiding mode */

#define UNGUIDED         0
#define TRACKING         1
#define OPTICAL          2
#define SELFTRACKING     3
#define SELFOPTICAL      4 

/* Frame type */

#define DARK             0     
#define LIGHT            1 
#define BIAS             2  
#define FLAT             3  

/* Supported devices */

#define USB              0
#define ETH              1

/* Guider feedback values */

#define GUIDE_THRESHOLD     100
#define GUIDE_X2AOX          10.0
#define GUIDE_Y2AOX           0.0
#define GUIDE_X2AOY           0.0
#define GUIDE_Y2AOY          10.0
#define GUIDE_X2TRACKX        0.5
#define GUIDE_Y2TRACKX        0.0
#define GUIDE_X2TRACKY        0.0
#define GUIDE_Y2TRACKY        0.5


