View unanswered posts | View active topics It is currently Thu Dec 18, 2014 2:04 am






Reply to topic  [ 5 posts ] 
teleop will no longer run 
Author Message
Rookie
User avatar

Joined: Wed Jan 09, 2013 11:48 pm
Posts: 42
Location: Saint Paul, MN
Post teleop will no longer run
I'm having this problem that did not show up at all before. My teleop program has worked for weeks but for some reason my brain beeps, wont run the program, and the screen displays "PgmCnt : 00002F , Type: 2. Does anyone know what this means? I can post my code if you want to see it. Also the same brain is running my autonomous perfectly fine.

_________________
Head Programmer FTC Team 6699, Tempest

Code:
<Life>
   Fun
</Life>


Wed Feb 13, 2013 5:40 pm
Profile WWW
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 619
Post Re: teleop will no longer run
Usually when you see that error code, the NXT has 'crashed'; would you be able to post your code using the [code] tags? That way we will be able to see what the potential problems could be. Please be sure to post all of the code, including the #pragma statements.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our Wiki and our Forums.

I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody


Thu Feb 14, 2013 12:46 pm
Profile
Rookie
User avatar

Joined: Wed Jan 09, 2013 11:48 pm
Posts: 42
Location: Saint Paul, MN
Post Re: teleop will no longer run
Code:
#pragma config(Sensor, S4,     IRseeker,       sensorNone)
#pragma config(Motor,  mtr_S1_C1_1,     East,          tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S1_C1_2,     West,          tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S1_C2_1,     North,         tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S1_C2_2,     South,         tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S1_C3_1,     Lift,          tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S1_C3_2,     None,          tmotorTetrix, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "JoystickDriver.c"


task main()
{
while(true)
   {
getJoystickSettings(joystick);


if(joystick.joy1_y1 > 40 || joystick.joy1_y1 < -40 )
{
   motor[West] = -joystick.joy1_y1/2;
}

if(joy1Btn(5) == 1 && (joystick.joy1_y1 > 40 || joystick.joy1_y1 < -40))
{
   motor[West] = -joystick.joy1_y1/8;
}


if(joystick.joy1_y1 < 40 && joystick.joy1_y1 > -40)
{
   motor[West] = 0;
}


if(joystick.joy1_y2 > 40 || joystick.joy1_y2 < -40)
{
   motor[East] = joystick.joy1_y2/2;
}

if(joy1Btn(5) == 1 && (joystick.joy1_y2 > 40 || joystick.joy1_y2 < -40))
{
   motor[East] = joystick.joy1_y2/8;
}


if(joystick.joy1_y2 < 40 && joystick.joy1_y2 > -40)
{
   motor[East] = 0;
}


if(joystick.joy1_x1 > 40 || joystick.joy1_x1 < -40)
{
   motor[North] = -joystick.joy1_x1/2;
}

if(joy1Btn(5) == 1 && (joystick.joy1_x1 > 40 || joystick.joy1_x1 < -40))
{
   motor[North] = -joystick.joy1_x1/8;
}


if(joystick.joy1_x1 < 40 && joystick.joy1_x1 > -40)
{
   motor[North] = 0;
}


if(joystick.joy1_x2 > 40 || joystick.joy1_x2 < -40)
{
   motor[South] = joystick.joy1_x2/2;
}

if(joy1Btn(5) == 1 && (joystick.joy1_x2 > 40 || joystick.joy1_x2 < -40))
{
   motor[South] = joystick.joy1_x2/8;
}


if(joystick.joy1_x2 < 40 && joystick.joy1_x2 > -40)
{
   motor[South] = 0;
}

///////////////////////////////////////////////////////////////



if (joystick.joy1_TopHat == 4)
{
   motor[Lift] = -10;
}
if (joystick.joy1_TopHat == -1)
{
   motor[Lift] = 0;
}
if(joystick.joy1_TopHat == 0)
{
   motor[Lift] = 50;
}
}
}
Here's my teleop, hopefully the problem is just with the code.

_________________
Head Programmer FTC Team 6699, Tempest

Code:
<Life>
   Fun
</Life>


Fri Feb 15, 2013 8:39 am
Profile WWW
Rookie
User avatar

Joined: Wed Jan 09, 2013 11:48 pm
Posts: 42
Location: Saint Paul, MN
Post Re: teleop will no longer run
I think I might have solved the problem, I haven't tested it yet, but I went into the motor setup on the robot tab and none of the old settings had really been saved, something must have happened when I had to re-install RobotC.

_________________
Head Programmer FTC Team 6699, Tempest

Code:
<Life>
   Fun
</Life>


Sat Feb 16, 2013 12:37 am
Profile WWW
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: teleop will no longer run
RobotC stores its preferences in registry keys (... I don't know why), which is probably why they were erased. It would be nice to have an "export preferences" feature ;)

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sat May 18, 2013 3:17 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.