Go to Post Pneumatic components always give me gas... - Alan Anderson [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-08-2016, 20:02
cpapplefamily cpapplefamily is offline
Registered User
FRC #3244 (Granite City Gearheads)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2015
Location: Minnesota
Posts: 230
cpapplefamily has a spectacular aura aboutcpapplefamily has a spectacular aura about
Re: PID onTarget() Updated

I think I'm going to run these parts in the execute method to see if there is a part that is taking too long
Code:
private double t_loopstart, t_loopend, t_getCX, t_getSpin, t_setSetpoint;
Code:
// Called repeatedly when this Command is scheduled to run
    protected void execute() {
    	t_loopstart = timeSinceInitialized(); // seconds since startup
    	double cX = Robot.vision.my_Get_Xcenter();
    	t_getCX = timeSinceInitialized(); // seconds since startup
    	double spin = Robot.vision.my_SpinToTarget_Lookup(cX);
    	t_getSpin = timeSinceInitialized(); // seconds since startup
    	m_setpoint = Robot.driveTrain.my_Get_Gyro() + (spin*-1);
    	t_setSetpoint = timeSinceInitialized(); // seconds since startup
    	//getPIDController().setSetpointRelative(spin*-1);
    	getPIDController().setSetpoint(m_setpoint);
    	t_loopend = timeSinceInitialized(); // seconds since startup

        SmartDashboard.putNumber("t_loopstart", t_loopstart);
    	SmartDashboard.putNumber("t_getCX", t_getCX);
    	SmartDashboard.putNumber("t_getSpin", t_getSpin);
    	SmartDashboard.putNumber("t_setSetpoint", t_setSetpoint);
    	SmartDashboard.putNumber("t_loopend", t_loopend);
}
Then plot on line graphs
Reply With Quote
Reply


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 09:38.

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