Go to Post i just want to say how awesome the high volume tank is. The high volume tank is 7/4 as awesome as the previous tanks. - Tytus Gerrish [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 06-01-2012, 04:20
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Custom RobotDrive

Hi CD, I was wondering how to make a new class that implements the obejcts and methods from the RobotDrive. Right now all the code, which runs works fine, is all in one file. Which is not very neat so I am trying to create seperate classes for everything such as the arm ,etc. Since we used mecanum we had to invert the motors and set the pwm channels and everything which took up a lot of space, so, I want to make something like this: (just as an example)

DriveTrainMecanum DriveSystem = new DriveTrainMecanum(1,2,3,4);

In which DriveTrainMecanum implements all the methods and objects from RobotDrive but it also does the inverting of the motors and everything else. This is what i have so far but its saying "no suitable constructor" :S How do i fix this:

This is what i have written so far:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.SimpleRobot;

public class DriveTrain extends RobotDrive {

//This is going to be set by the user but iam just making it for now
Jaguar frontLeft = new Jaguar(1);
Jaguar frontRight = new Jaguar(2);
Jaguar rearLeft = new Jaguar(3);
Jaguar rearRight = new Jaguar(4);


public DriveTrainMecanum(int cone, int ctwo, int cthree, int cfour){

}

}
__________________
"A team back in training !"
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:21.

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