Go to Post Use sensors to collect data about the surrounding environment, then discard it and drive into walls. - Jared Russell [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2015, 20:25
AnnaliseDonavan AnnaliseDonavan is offline
Registered User
FRC #4284
 
Join Date: Jan 2015
Location: Cincinnati,Ohio
Posts: 20
AnnaliseDonavan is an unknown quantity at this point
Exclamation CodeProblem

I run the code and the Driver station accepts it and allows it to run but when I press the buttons nothing happens? Pleas help ASAP


package org.usfirst.frc.team4284.robot;



import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.buttons.Button;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class Robot extends IterativeRobot {
RobotDrive Drive;
Joystick drivestick;
Joystick joystick;
int autoLoopCounter;

/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {

Jaguar FL = new Jaguar (5);
Jaguar BL = new Jaguar (2);
Jaguar FR = new Jaguar (3);
Jaguar BR = new Jaguar (4);
Drive = new RobotDrive(FL,BL,FR,BR);
drivestick = new Joystick(0);
joystick = new Joystick(1);


}

/**
* This function is run once each time the robot enters autonomous mode
*/
public void autonomousInit() {
autoLoopCounter = 0;
}

/**
* This function is called periodically during autonomous
*/
public void autonomousPeriodic() {
/*if(autoLoopCounter < 100) //Check if we've completed 100 loops (approximately 2 seconds)
{
Drive.drive(-0.5, 0.0); // drive forwards half speed
autoLoopCounter++;
} else {
Drive.drive(0.0, 0.0); // stop robot
} */
}

/**
* This function is called once each time the robot enters tele-operated mode
*/
public void teleopInit(){

}

/**
* This function is called periodically during operator control
*/
public void teleopPeriodic() {
Drive.arcadeDrive(drivestick);

Button button1 = new JoystickButton(joystick, 1),
button2 = new JoystickButton(joystick, 2),
button3 = new JoystickButton(joystick, 3),
button4 = new JoystickButton(joystick, 4),
button5 = new JoystickButton(joystick, 5),
button6 = new JoystickButton(joystick, 6),
button7 = new JoystickButton(joystick, 7),
button8 = new JoystickButton(joystick, 8),
button9 = new JoystickButton(joystick, 9),
button10 = new JoystickButton(joystick, 10),
button11 = new JoystickButton(joystick , 11);


button1.whenPressed(new ElevatorOff());
button2.whenPressed(new ElevatorOn());
button3.whenPressed(new ElevatorReverse());
button4.whenPressed(new ArmsOut());
button5.whenPressed(new ArmsIn());
button6.whenPressed(new ArmsVerticalIn());
button7.whenPressed(new ArmsVarticalOut());
button8.whenPressed(new BlueLightShow());
button9.whenPressed(new LigthShowOn());
button10.whenPressed(new RedLightShow());
button11.whenPressed(new LightShowEnd());




}



/**
* This function is called periodically during test mode
*/
public void testPeriodic() {
LiveWindow.run();


}

}


package org.usfirst.frc.team4284.robot;
import edu.wpi.first.wpilibj.Talon;

import edu.wpi.first.wpilibj.command.Command;

public class ArmsIn extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
Talon LeftArm = new Talon(9);
Talon RightArm = new Talon(8);

LeftArm.set(1);
RightArm.set(-1);
try {
Thread.sleep(500); //stop for 1/2 second
} catch(InterruptedException ex) { // allows for interruption of the sleep period
Thread.currentThread().interrupt();
}

LeftArm.set(0);
RightArm.set(0);


}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}



package org.usfirst.frc.team4284.robot;
import edu.wpi.first.wpilibj.Talon;

import edu.wpi.first.wpilibj.command.Command;

public class ArmsOut extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {

Talon RightArm = new Talon(9);
Talon LeftArm = new Talon(8);

LeftArm.set(-1);
RightArm.set(1);
try {
Thread.sleep(500); //stop for 1/2 second
} catch(InterruptedException ex) { // allows for interruption of the sleep period
Thread.currentThread().interrupt();
}

LeftArm.set(0);
RightArm.set(0);
// TODO Auto-generated method stub

}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}




package org.usfirst.frc.team4284.robot;

import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.command.Command;

public class ArmsVarticalOut extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
Talon In_Out = new Talon(7);
Talon In__Out = new Talon(0);


In_Out.set(-1);
In__Out.set(-1);
try {
Thread.sleep(500); //stop for 1/2 second
} catch(InterruptedException ex) { // allows for interruption of the sleep period
Thread.currentThread().interrupt();
}
In_Out.set(0);
In__Out.set(0);
// TODO Auto-generated method stub

}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}



package org.usfirst.frc.team4284.robot;

import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.command.Command;

public class ArmsVerticalIn extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {

Talon In_Out = new Talon (7);
Talon In__Out = new Talon(0);


In_Out.set(1);
In__Out.set(1);
try {
Thread.sleep(500); //stop for 1/2 second
} catch(InterruptedException ex) { // allows for interruption of the sleep period
Thread.currentThread().interrupt();
}
In_Out.set(0);
In__Out.set(0);

}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}



package org.usfirst.frc.team4284.robot;

import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.command.Command;

public class BlueLightShow extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
// TODO Auto-generated method stub
Relay relay1 = new Relay(0);
Relay relay2 = new Relay(1);
relay1.set(Relay.Value.kOn);
relay2.set(Relay.Value.kOff);

}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}

package org.usfirst.frc.team4284.robot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.command.Command;

public class ElevatorOff extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
// TODO Auto-generated method stub
Jaguar Elevator1 = new Jaguar(5);
Jaguar Elevator2 = new Jaguar(0);


Elevator1.set(0);
Elevator2.set(0);

}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}


package org.usfirst.frc.team4284.robot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.command.Command;

public class ElevatorOn extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
// TODO Auto-generated method stub
Jaguar Elevator1 = new Jaguar(5);
Jaguar Elevator2 = new Jaguar(0);

Elevator1.set(.25);
Elevator2.set(.25);


}

@Override
protected boolean isFinished() {
return false;
}

@Override
protected void end() {


}

@Override
protected void interrupted() {

}

}


package org.usfirst.frc.team4284.robot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.command.Command;

public class ElevatorReverse extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
// TODO Auto-generated method stub
Jaguar Elevator1 = new Jaguar(5);
Jaguar Elevator2 = new Jaguar(0);

Elevator1.set(-.25);
Elevator2.set(-.25);


}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}


package org.usfirst.frc.team4284.robot;
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.command.Command;

public class LightShowEnd extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
// TODO Auto-generated method stub
Relay relay1 = new Relay(0);
Relay relay2 = new Relay(1);
relay1.set(Relay.Value.kOff);
relay2.set(Relay.Value.kOff);


}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}

package org.usfirst.frc.team4284.robot;

import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.command.Command;

public class LigthShowOn extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
// TODO Auto-generated method stub

Relay relay1 = new Relay(0);
Relay relay2 = new Relay(1);

relay1.set(Relay.Value.kReverse);
relay2.set(Relay.Value.kOn);
try {
Thread.sleep(5000); //stop for 1/2 second
} catch(InterruptedException ex) { // allows for interruption of the sleep period
Thread.currentThread().interrupt();
}
//Turn on lights Blue and Green)
relay1.set(Relay.Value.kOn);
relay2.set(Relay.Value.kReverse);
try {
Thread.sleep(5000); //stop for 1/2 second
} catch(InterruptedException ex) { // allows for interruption of the sleep period
Thread.currentThread().interrupt();
}
// Turns on blue and red lights
relay1.set(Relay.Value.kOn);
relay2.set(Relay.Value.kForward);
try {
Thread.sleep(5000); //stop for 1/2 second
} catch(InterruptedException ex) { // allows for interruption of the sleep period
Thread.currentThread().interrupt();
}
relay1.set(Relay.Value.kReverse);
relay2.set(Relay.Value.kOn);


}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}


package org.usfirst.frc.team4284.robot;
import edu.wpi.first.wpilibj.Relay;

import edu.wpi.first.wpilibj.command.Command;

public class RedLightShow extends Command {

@Override
protected void initialize() {
// TODO Auto-generated method stub

}

@Override
protected void execute() {
// TODO Auto-generated method stub
Relay relay1 = new Relay(0);
Relay relay2 = new Relay(1);
relay2.set(Relay.Value.kForward);
relay1.set(Relay.Value.kReverse);

}

@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return false;
}

@Override
protected void end() {
// TODO Auto-generated method stub

}

@Override
protected void interrupted() {
// TODO Auto-generated method stub

}

}



Please and thank you
  #2   Spotlight this post!  
Unread 15-02-2015, 21:37
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 78
legts is an unknown quantity at this point
Re: CodeProblem

Quote:
Originally Posted by AnnaliseDonavan View Post
Button button1 = new JoystickButton(joystick, 1),
button2 = new JoystickButton(joystick, 2),
button3 = new JoystickButton(joystick, 3),
button4 = new JoystickButton(joystick, 4),
button5 = new JoystickButton(joystick, 5),
button6 = new JoystickButton(joystick, 6),
button7 = new JoystickButton(joystick, 7),
button8 = new JoystickButton(joystick, 8),
button9 = new JoystickButton(joystick, 9),
button10 = new JoystickButton(joystick, 10),
button11 = new JoystickButton(joystick , 11);
I think I know what your problem is. If, and if being the key word, button1 works, then my theory is correct. When declaring buttons, you need to have then declared exactly as button1 is declared. Namely, having "Button" before the button name. Hope I helped!
  #3   Spotlight this post!  
Unread 15-02-2015, 21:43
Cyan's Avatar
Cyan Cyan is offline
Vegeta SSJ4
AKA: Sayan Dutta
FRC #2642 (Pitt Pirates)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Utopia
Posts: 27
Cyan is an unknown quantity at this point
Re: CodeProblem

Quote:
Originally Posted by legts View Post
I think I know what your problem is. If, and if being the key word, button1 works, then my theory is correct. When declaring buttons, you need to have then declared exactly as button1 is declared. Namely, having "Button" before the button name. Hope I helped!
I don't believe this is the problem. Notice there are commas instead of semicolons at the end of each line; this should be the correct syntax.


As for AnnaliseDonavan, could you be more specific in your question? Also, which IDE do you use? Your code is relatively messy, so if you could show me one instance where your code does not work, you could troubleshoot through that pathway and follow example with the rest of the buttons.
  #4   Spotlight this post!  
Unread 15-02-2015, 21:45
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 78
legts is an unknown quantity at this point
Re: CodeProblem

Quote:
Originally Posted by Cyan View Post
I don't believe this is the problem. Notice there are commas instead of semicolons at the end of each line; this should be the correct syntax.
I did not notice that before, thanks for pointing that out!
  #5   Spotlight this post!  
Unread 15-02-2015, 23:09
AnnaliseDonavan AnnaliseDonavan is offline
Registered User
FRC #4284
 
Join Date: Jan 2015
Location: Cincinnati,Ohio
Posts: 20
AnnaliseDonavan is an unknown quantity at this point
Re: CodeProblem

As for the needing of semi colons for this set up when I place semi colons it produces an error and when I looked up the correct way to do the button control this is what I found.

And I apologist I am new to coding but no one on my team knows how to code so we are lost. For the one instance currently all I have in the implementing stage is the buttons so that is all the is and it dose not work.
  #6   Spotlight this post!  
Unread 16-02-2015, 00:08
Cyan's Avatar
Cyan Cyan is offline
Vegeta SSJ4
AKA: Sayan Dutta
FRC #2642 (Pitt Pirates)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Utopia
Posts: 27
Cyan is an unknown quantity at this point
Re: CodeProblem

Try moving this code:
Code:
Button button1 = new JoystickButton(joystick, 1),
button2 = new JoystickButton(joystick, 2),
button3 = new JoystickButton(joystick, 3),
button4 = new JoystickButton(joystick, 4),
button5 = new JoystickButton(joystick, 5),
button6 = new JoystickButton(joystick, 6),
button7 = new JoystickButton(joystick, 7),
button8 = new JoystickButton(joystick, 8),
button9 = new JoystickButton(joystick, 9),
button10 = new JoystickButton(joystick, 10),
button11 = new JoystickButton(joystick , 11);
from Robot.teleopPeriodic() to Robot.robotInit(), and see if that leads to anything.
  #7   Spotlight this post!  
Unread 16-02-2015, 00:12
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,112
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: CodeProblem

I don't see any Scheduler.run() call in your teleop periodic code. Without that, there is nothing to call the commands that you have assigned to buttons.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
  #8   Spotlight this post!  
Unread 16-02-2015, 00:12
om_nom_nom om_nom_nom is offline
Registered User
AKA: Nam
FRC #0708 (Hardwired Fusion)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Pennsylvania
Posts: 6
om_nom_nom is an unknown quantity at this point
Re: CodeProblem

This may not solve much, but I suggest moving your button code into teleopInit(), otherwise you are creating buttons in a loop during teleop.

Also, have you tested your commands without the buttons? The issue may be that your commands are not working, not the buttons. To do this in Java, you can add
Code:
SmartDashboard.putData(new Command());
into your robotInit(). Then open up SmartDashboard from the driver station or a double-clicking on the program. You should see a button on the Dashboard after you compile that code. Click it to run, and click it again to cancel.
  #9   Spotlight this post!  
Unread 16-02-2015, 00:39
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,679
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: CodeProblem

Quote:
Originally Posted by legts View Post
I did not notice that before, thanks for pointing that out!
This is one of the important reasons to follow programming style conventions - that is, make your code look like programmers expect. In this case, the usual convention for objects is that the commas are only used if they are not being set. It's also common to keep columns aligned as you go down parallel code; this is why code is traditionally displayed in a fixed-width font. The usual style conventions would look like:
Code:
Button button1  = new JoystickButton(joystick,  1);
Button button2  = new JoystickButton(joystick,  2);
Button button3  = new JoystickButton(joystick,  3);
Button button4  = new JoystickButton(joystick,  4);
Button button5  = new JoystickButton(joystick,  5);
Button button6  = new JoystickButton(joystick,  6);
Button button7  = new JoystickButton(joystick,  7);
Button button8  = new JoystickButton(joystick,  8);
Button button9  = new JoystickButton(joystick,  9);
Button button10 = new JoystickButton(joystick, 10);
Button button11 = new JoystickButton(joystick, 11);
Following programming style conventions is nearly as important as following wiring color code conventions, and for exactly the same reason -- so that the guy (or gal) who comes behind you can easily figure out what you did. So far, it's not the law, or even in the FRC rules, but maybe it should be. Or maybe not -- do we really want code inspectors?
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #10   Spotlight this post!  
Unread 16-02-2015, 10:22
one_each one_each is offline
Registered User
FRC #4057 (KB Bots)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2012
Location: Klamath Falls, Or
Posts: 25
one_each is an unknown quantity at this point
Re: CodeProblem

Quote:
Originally Posted by Oblarg View Post
I don't see any Scheduler.run() call in your teleop periodic code. Without that, there is nothing to call the commands that you have assigned to buttons.
This is the most likely cause of the problem. I would create a second project just to see what the default code does.

In the teleopPeriodic() method, you are creating Button objects then calling the whenPressed() methods. Next, the teleopPeriodic() ends and those objects go away (Garbage Collected). While this might work (I have not tested) if you add the Scheduler.run() call, it is a waste of time and effort for the roboRio.

Instead, I would recommend making the Button objects as member fields (just move the Button button1 ... ; statement outside of all methods) and moving the whenPressed() method calls to teleopInit(). Don't forget to add back the call to Scheduler.run()!
  #11   Spotlight this post!  
Unread 17-02-2015, 14:02
AnnaliseDonavan AnnaliseDonavan is offline
Registered User
FRC #4284
 
Join Date: Jan 2015
Location: Cincinnati,Ohio
Posts: 20
AnnaliseDonavan is an unknown quantity at this point
Exclamation Re: CodeProblem

Okay so I tried moving the
Scheduler.run()
Button button1 = new JoystickButton(joystick, 1),
button2 = new JoystickButton(joystick, 2),
button3 = new JoystickButton(joystick, 3),
button4 = new JoystickButton(joystick, 4),
button5 = new JoystickButton(joystick, 5),
button6 = new JoystickButton(joystick, 6),
button7 = new JoystickButton(joystick, 7),
button8 = new JoystickButton(joystick, 8),
button9 = new JoystickButton(joystick, 9),
button10 = new JoystickButton(joystick, 10),
button11 = new JoystickButton(joystick , 11);
code to both outside of the whole code and the robot int and the program fails to recognize that

button1.whenPressed(new ElevatorOff());
button2.whenPressed(new ElevatorOn());
button3.whenPressed(new ElevatorReverse());
button4.whenPressed(new ArmsOut());
button5.whenPressed(new ArmsIn());
button6.whenPressed(new ArmsVerticalIn());
button7.whenPressed(new ArmsVarticalOut());
button8.whenPressed(new BlueLightShow());
button9.whenPressed(new LigthShowOn());
button10.whenPressed(new RedLightShow());
button11.whenPressed(new LightShowEnd());

is connected it comes up with a syntax error that the button1 - button11 is not defined.
  #12   Spotlight this post!  
Unread 17-02-2015, 15:35
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 78
legts is an unknown quantity at this point
Re: CodeProblem

If any of your commands require parameters then that could be why nothing is happening. As for declaring the buttons, that should be in the constructor of your OI file.
  #13   Spotlight this post!  
Unread 17-02-2015, 17:56
AnnaliseDonavan AnnaliseDonavan is offline
Registered User
FRC #4284
 
Join Date: Jan 2015
Location: Cincinnati,Ohio
Posts: 20
AnnaliseDonavan is an unknown quantity at this point
Re: CodeProblem

The Template I am using dose not have a OI section is there another way around it?
  #14   Spotlight this post!  
Unread 17-02-2015, 17:58
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 78
legts is an unknown quantity at this point
Re: CodeProblem

I don't know if it's possible to create one. You could try creating a new robot template to see if it has an OI and try to make one based off of that....
  #15   Spotlight this post!  
Unread 18-02-2015, 01:34
Oblarg Oblarg is offline
Registered User
AKA: Eli Barnett
FRC #0449 (The Blair Robot Project)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Philadelphia, PA
Posts: 1,112
Oblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond reputeOblarg has a reputation beyond repute
Re: CodeProblem

Quote:
Originally Posted by legts View Post
As for declaring the buttons, that should be in the constructor of your OI file.
You don't have to do it there, though. As long as they are declared somewhere before you enter your teleop periodic loop, it will work.
__________________
"Mmmmm, chain grease and aluminum shavings..."
"The breakfast of champions!"

Member, FRC Team 449: 2007-2010
Drive Mechanics Lead, FRC Team 449: 2009-2010
Alumnus/Technical Mentor, FRC Team 449: 2010-Present
Lead Technical Mentor, FRC Team 4464: 2012-2015
Technical Mentor, FRC Team 5830: 2015-2016
Closed Thread


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


All times are GMT -5. The time now is 21:10.

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