Go to Post I'm Getting Old. - MrForbes [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-02-2011, 00:55
Bluedog24 Bluedog24 is offline
Head Programmer
AKA: Joey Ipock
FRC #1544 (One Byte Short)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Anchorage, Alaska
Posts: 14
Bluedog24 is an unknown quantity at this point
Robot driving off.

Why would our robot try to run off? After I uploaded the code and enabled it on the driver station, without touching the joystick, the wheels started running at full speed and wouldn't stop.

Here's the code and I was using a Logitech Dual Action controller.

Code:
package edu.wpi.first.wpilibj.templates;



import edu.wpi.first.wpilibj.*; //Imports everything


public class RobotTemplate extends SimpleRobot {
RobotDrive drive = new RobotDrive(1,2,3,4); //Signal wires from jaguars to digital sidecar
Joystick stick = new Joystick(1); //Logitech Dual Action controller
Joystick arm = new Joystick(2); //Logitech Attack 3 controller

public RobotTemplate(){
    getWatchdog().setExpiration(0.5);
    
    compressor.start();
    
}

    public void autonomous() { //Autonomous
        
    }


    public void operatorControl() { 
   while (true && isOperatorControl() && isEnabled()) { 
       getWatchdog().feed();
       drive.mecanumDrive_Polar(stick.getDirectionDegrees(), stick.getMagnitude(),stick.getRawAxis(4));
       Timer.delay(0.005); 


        }
    }
}
Any ideas?
Reply With Quote
 


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 11:22.

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