I would suggest that you verify a few things. The write-error could be caused by something going wrong prior (upline)...
Are you able to do printf() or use the driver station LCD or SmartDashboard in order to get printouts? If so, then you need to verify a few things
Code:
AxisCamera* pCamera = AxisCamera::GetInstance();
if (pCamera)
{
ColorImage* pImage = pCamera->GetImage();
if (pImage)
{
if (pImage->GetHeight() == 0 || pImage->GetWidth()==0)
printf("Error with image size - height/width is zero.\n");
else
{
pImage->Write("Image.jpg");
printf("Wrote file out to Image.jpg...should be a success.\n");
}
delete pImage;
}
else
printf("Image returned by GetImage was NULL. Big error.\n");
}
else
printf("Never got the camera instance. Big error.\n");
If this runs and says "Wrote file out...." then goto your browser when the robot is in DISABLED mode via
ftp://10.te.am.2 and click (hopefully) on Image.jpg and see it.
Let me know where you encounter errors in this process and we'll go from there.
bob