Go to Post The fact that although many of us disagree on specifics of how FIRST should conduct events, design a game, and facilitate as much fairness between teams as possible, in the end we still greatly enjoy each other's passion for FIRST and provide genuine respect for each other - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 07-12-2009, 21:48
kevin51292 kevin51292 is offline
Registered User
FRC #2753
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Hillsborough, NJ
Posts: 8
kevin51292 is an unknown quantity at this point
Re: Camera Error Number

Hey Guys!!

Thanks for the responses. I am actually using WindRiver this year. I found in the FRCError.h header file that my error number is an initialization error, but I'm still not really sure why I'm getting it. I copied my source code in the bottom of this post, so maybe that will help.

#include <iostream.h>
#include "math.h"

#include "AxisCamera.h"
#include "BaeUtilities.h"
#include "FrcError.h"
#include "TrackAPI.h"
#include "Target.h"
#include "WPILib.h"

#include "Gamepad.h"


int SleepingGrandma_debugFlag = 1;

/**
* This is a demo program showing the use of the color tracking API to track two colors.
* It uses the SimpleRobot class as a base of a robot application that will automatically call your
* Autonomous and OperatorControl methods at the right time as controlled by the switches on
* the driver station or the field controls. Autonomous mode tracks color assuming camera is
* mounted on a gimbal with two servos.
*/

class SleepingGrandma : public IterativeRobot
{
RobotDrive *myRobot; // robot drive system
Joystick *rightStick; // joystick 1 (arcade stick or right tank stick)
Joystick *leftStick; // joystick 2 (tank left stick)
DriverStation *ds; // driver station object
Servo *horizontalServo; // first servo object
Servo *verticalServo; // second servo object

public:
/**
* Constructor for this robot subclass.
* Create an instance of a RobotDrive with left and right motors plugged into PWM
* ports 1 and 2 on the first digital module. The two servos are PWM ports 3 and 4.
* Tested with camera settings White Balance: Flurorescent1, Brightness 40, Exposure Auto
*/


public:
/**
* Constructor for this robot subclass.
* Create an instance of a RobotDrive with left and right motors plugged into PWM
* ports 1 and 2 on the first digital module. The two servos are PWM ports 3 and 4.
* Tested with camera settings White Balance: Flurorescent1, Brightness 40, Exposure Auto
*/
SleepingGrandma(void)
{
ds = DriverStation::GetInstance();
myRobot = new RobotDrive(1, 2, 0.5); // robot will use PWM 1-2 for drive motors
rightStick = new Joystick(1); // create the joysticks
leftStick = new Joystick(2);
// remember to use jumpers on the sidecar for the Servo PWMs
SetDebugFlag ( DEBUG_SCREEN_ONLY ) ;


/* stop the watchdog if debugging */
GetWatchdog().SetExpiration(0.5);
GetWatchdog().SetEnabled(false);
}


void DisabledInit(void)
{
}

void DisabledPeriodic(void)
{
}

void DisabledContinuous(void)
{
}

void AutonomousInit(void)
{
}

void AutonomousPeriodic(void)
{
}

void AutonomousContinuous(void)
{
}

void TeleopInit(void)
{

}

void TeleopPeriodic(void)
{

}

void TeleopContinuous(void)
{
int val = StartCameraTask(10, 0, k160x120, ROT_0);
StartImageSignal(val);
StartImageAcquisition();
Image* myImage = frcCreateImage(IMAQ_IMAGE_RGB);
dprintf (LOG_INFO,"\n\n%i\n\n%i",GetImage(myImage,NULL));
dprintf(LOG_INFO,"\n\n%i",GetLastVisionError());

}
};

START_ROBOT_CLASS(SleepingGrandma);
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Axis Camera Communications Error furiousgeorge Programming 7 18-11-2009 22:02
Camera error message Slick NI LabVIEW 1 25-01-2009 11:34
Axis Camera in C++; code error?? Straberrie Programming 3 22-12-2008 21:52
What's this number 80 in error math? K.Porter Programming 3 25-01-2007 18:28
Camera pointing error? Craig Putnam Programming 14 21-01-2006 02:52


All times are GMT -5. The time now is 13:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi