Go to Post Slight physical blocks will never stop a good programmer, we can just program around it. - AIBob [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
  #4   Spotlight this post!  
Unread 01-27-2016, 02:02 PM
VrewDaive VrewDaive is offline
Registered User
FRC #4284
 
Join Date: Sep 2015
Location: Cincinnati
Posts: 21
VrewDaive is an unknown quantity at this point
Re: Xbox Controller with mecanum drive

so would something like this work as expected?
Code:
     */  RobotDrive myDrive;
    	Joystick moveStick;
    	Gyro gyro;
    	
    
    public void robotInit() {
    	Talon TalLF = new Talon(0);
    	Talon TalLR = new Talon(1);
    	Talon TalRF = new Talon(2);
    	Talon TalRR = new Talon(3);
    	myDrive =  new RobotDrive(TalLF,TalLR,TalRF,TalRR);
    	moveStick = new Joystick(1);
    	
    }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {

    }

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
    	
    	//while(!isAutonomous() && isEnabled())
    	//{
    		//myDrive.mecanumDrive_Polar(moveStick.getRawAxis(1),moveStick.getRawAxis(2) , moveStick.getRawAxis(4));
    		myDrive.mecanumDrive_Cartesian(moveStick.getRawAxis(1), moveStick.getRawAxis(2), moveStick.getRawAxis(5), gyro.getAngle());
    		Timer.delay(0.01);
    	//}
        
    }
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 08:26 AM.

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