Add debug parameter to Dingo camera driver.

This commit is contained in:
Ferdi Franceschini
2014-07-24 12:48:00 +10:00
parent 67a3a198ac
commit 1707cba55f

View File

@ -73,14 +73,14 @@ static int NUMCAMPAR = CAMDRIV_PARTABLE;
#define TR(a,b) a, #define TR(a,b) a,
#define TE(a,b) a #define TE(a,b) a
enum campar {CAMDRIV_PARTABLE, MULTI}; enum campar {CAMDRIV_PARTABLE, MULTI, DEBUG};
enum flipval {FLIP_TABLE}; enum flipval {FLIP_TABLE};
#undef TR #undef TR
#undef TE #undef TE
#define TR(a,b) b, #define TR(a,b) b,
#define TE(a,b) b #define TE(a,b) b
static char *cacmdstr[] = {CAMDRIV_PARTABLE, "multi", NULL}; static char *cacmdstr[] = {CAMDRIV_PARTABLE, "multi", "debug", NULL};
static char *flipcmdstr[] = {FLIP_TABLE, NULL}; static char *flipcmdstr[] = {FLIP_TABLE, NULL};
#undef TR #undef TR
#undef TE #undef TE
@ -341,6 +341,12 @@ static int CamSet(CounterDriver *cntrData, char *name, int iCter, float fVal) {
return 0; return 0;
} }
switch (id) { switch (id) {
case DEBUG:
if (fVal == 1)
camdriv->debug = 1;
else
camdriv->debug = 0;
break;
case MULTI: case MULTI:
if (fVal != 0 && fVal != 1) { if (fVal != 0 && fVal != 1) {
return 0; return 0;