|
Page 1 of 1
|
[ 5 posts ] |
|
teleop will no longer run
Author |
Message |
cookthebook
Rookie
Joined: Wed Jan 09, 2013 11:48 pm Posts: 46 Location: Saint Paul, MN
|
 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
|
Wed Feb 13, 2013 5:40 pm |
|
 |
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 722
|
 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 updated help documentation and the ROBOTC Forums.
|
Thu Feb 14, 2013 12:46 pm |
|
 |
cookthebook
Rookie
Joined: Wed Jan 09, 2013 11:48 pm Posts: 46 Location: Saint Paul, MN
|
 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
|
Fri Feb 15, 2013 8:39 am |
|
 |
cookthebook
Rookie
Joined: Wed Jan 09, 2013 11:48 pm Posts: 46 Location: Saint Paul, MN
|
 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
|
Sat Feb 16, 2013 12:37 am |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 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 |
|
|
|
Page 1 of 1
|
[ 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
|
|