View Single Post
  #2   Spotlight this post!  
Unread 07-02-2010, 09:36
tbinns tbinns is offline
Registered User
FRC #0131 (CHAOS)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Manchester, NH
Posts: 4
tbinns is an unknown quantity at this point
Re: Error creating tasks that use encoders

Joe, Thanks

I have uploaded the files for the dribbler. It is created in the dribbler class is created in the main Iterative robot and defined in its .h file. Segments of the main robot included at the end to show order of creation.

The Dashboard is past in from to the constructor and appears to have the same issues.

AccessDribblerStateMachine(Dribbler *d) (a file scoped function) called the dribbler class statemachine, but during testing we moved the encoder to see if there was different results and there was no change in the error. In the statemachine we commented out // DashData-> to work on one issue at the time, this also goes for the victors at the end of the function that result in the same error.

Parts from our Main robot:
Breakaway10::Breakaway10(void) : camera(AxisCamera::GetInstance())
{
//Robot Base Drive Initializers:
//Gamepad Initializers:
//Gyro Initializers:
//PID Output Initializers:
//TurnController Initializers USES PID OUTPUT, USES GYRO
//Dashboard Initializers:
dds = new DashboardDataSender();
//Compressor Initializers:
compressor = new Compressor(COMPRESS_PRESSURE_SWITCH_CHANNEL, COMPRESS_RELAY_CHANNEL);
//Encoder Initializers: (were passed to dribbler but now created within dribbler
// leftEncoder = new Encoder(DIO_MODULE1, LEFT_MOTOR_ENCODER_CHANNEL_A, DIO_MODULE1, LEFT_MOTOR_ENCODER_CHANNEL_B, ENCODER_DISTANCEPERPULSE);
// rightEncoder = new Encoder(DIO_MODULE1, RIGHT_MOTOR_ENCODER_CHANNEL_A, DIO_MODULE1, RIGHT_MOTOR_ENCODER_CHANNEL_B, ENCODER_DISTANCEPERPULSE);
//Dash Sharing Initializers:
DashData = new DashSharing();
//Dribbler Initializers: USES DASH DATA
dribbler = new Dribbler(DashData);
......

void Breakaway10::TeleopContinuous(void)
{

//We need to start these tasks before we begin the loop, to use the enable function
//ChaosKicker->Start();
//Wait(0.5);
dribbler->Start();

// ->->-> MAIN LOOP BEGINS HERE <-<-<-
...........

Thanks,
Todd Binns
Software Mentor
Attached Files
File Type: cpp Dribbler.cpp (3.9 KB, 9 views)
File Type: h Dribbler.h (1.4 KB, 9 views)
Reply With Quote