Problems with CPIA_GetColourParams and CPIA_GetColourBalance

Mads Bondo Dydensborg madsdyd@challenge.dk
Thu, 30 Sep 1999 02:39:59 +0200 (CEST)


Hi there.

I am trying to get a grip on the driver. Read through "developer.pdf", and
spent some time fidling with Bas H's testclient.

I wanted to do something like this:

  cpia_docommand(fd, CPIA_IOC_GetCameraStatus);
  while ((cmd.result.GetCameraStatus.CmdError != 0)&&(!quit))
    {
      printf("command error = %d ... resetting
it\n",cmd.result.GetCameraStatus.CmdError);
      cpia_docommand(fd, CPIA_IOC_ModifyCameraStatus,CMDERROR,0,0,0);
      cpia_docommand(fd, CPIA_IOC_GetCameraStatus);
    };
  cpia_docommand(fd, CPIA_IOC_SetVPDefaults);
  cpia_docommand(fd, CPIA_IOC_GetColourParameters);
  cpia_docommand(fd, CPIA_IOC_GetCameraStatus);
  while ((cmd.result.GetCameraStatus.CmdError != 0)&&(!quit))
    {
      printf("command error = %d ... resetting
it\n",cmd.result.GetCameraStatus.CmdError);
      cpia_docommand(fd, CPIA_IOC_ModifyCameraStatus,CMDERROR,0,0,0);
      cpia_docommand(fd, CPIA_IOC_GetCameraStatus);
    };
  
  cpia_docommand(fd, CPIA_IOC_GetColourBalance);
  cpia_docommand(fd, CPIA_IOC_GetCameraStatus);
  while ((cmd.result.GetCameraStatus.CmdError != 0)&&(!quit))
    {
      printf("command error = %d ... resetting
it\n",cmd.result.GetCameraStatus.CmdError);
      cpia_docommand(fd, CPIA_IOC_ModifyCameraStatus,CMDERROR,0,0,0);
      cpia_docommand(fd, CPIA_IOC_GetCameraStatus);
    };
  cpia_docommand(fd, CPIA_IOC_GetExposure);


Which is

GetCameraStatus
SetVPDefaults
GetColourParameters
(GetCameraStatus)
GetColourBalance
(GetCameraStatus)
GetExpousere

The cpia_docommand is the docommand from Bas H's client. The camera is in
"high mode" before the above steps are taken.

This is the output:

GotoHiPower 
camera now in HIGH power state 
SetVPDefaults
GetColourParameters all 3 bytes 256 
GetColourParameters all 3 bytes 256
GetColourParameters all 3 bytes 256 
GetColourParameters all 3 bytes 256
GetColourParameters all 3 bytes 256 
GetColourBalance all 3 bytes 256
GetColourBalance all 3 bytes 256 
GetColourBalance all 3 bytes 256
GetColourBalance all 3 bytes 256
GetColourBalance all 3 bytes 256                                                


Apart from the fact, that I assume 255 is the correct value, not 256, I
take this to mean, that the communication with the camera went fine, but
the values returned indicate an error (maybe a malformed request?)

GetCameraState, and GetExposure seems to work fine.

What am I doing wrong? (I noted that both GetCameraState and GetExposure
returns 8 byte, whereas the two others only return 3).

Thanks,

Mads

-----------------------------------------------------------------------------
To unsubscribe from this mailinglist, send the line "unsubscribe vision-webcam" in the
body of a message to "majordomo@errors.no".