Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Talon Question (http://www.chiefdelphi.com/forums/showthread.php?t=111347)

Peragore 01-15-2013 10:13 PM

Talon Question
 
Hey guys,

Got another question. We have recently moved to the Talon motor controller and the Java language (two changes in one! Yay!) Anyways, we were running some tests on our test board (which electrical swears is wired correctly), and found that we were unable to send output to the Talons, even though we could get live feedback from the joysticks. We solved one problem earlier by changing where some of our variables are declared, but do no think it is the case this time. Our github is https://github.com/Peragore/Team3373_2013.git, and any help would be appreciated. The main file is Team3373.java. I believe a mentor could probably solve this pretty quickly, but our programming mentor currently is incredibly busy. Anyways, thanks for the help!

Philip Mulford, Team 3373

NotInControl 01-16-2013 06:20 PM

Re: Talon Question
 
In order to command the motors you need to call the .set() method

so something like StageOneTalon.set(1); will drive it at full speed.

I didn't see this anywhere in your code, maybe I overlooked it?

On another note, it seems like you are creating multiple references of the same class unnecessarily. I.E. creating a new Team3375 reference in your drive class.

All of your functional classes (i.e drive, shooter) should be independent of your main Class (Team3373) . In other words you should not need to create a new instance of your main class in your functional classes.

Once your functional classes are defined. Your main class (Team3375) should import those classes and create instances of them, then call the methods within them.

I would suggest you do a search on github and chief delphi for some 2012 FRC example code, and maybe move to a more structured Java environment like iterative or commandBase.

We personally use commandBase, and while we find iterativeRobot to be the easiest to grasp out of the box amongst students, we find CommandBase to be the easiest to code once you grasp the architecture.


Hope this helps,
Kev

Peragore 01-16-2013 06:34 PM

Re: Talon Question
 
Thanks! I believe our Talon.set() commands were within the shooter class. Anyways, as to the other things, I haven't really looked at Iterative Robot or command base, but that sounds like something I need to look into. The Drive class is something that hasn't really been worked on at all, because our team has not given us Drive specs yet, so we are unsure of whether they are using Mechanum or standard Drivetrain. After spending the week searching for anything and everything that had gone wrong, we found that electrical had messed up, so the code was actually functional, to an extent.... Thanks for the time and advice. As I said, we are new to Java, and this is really the first year we are codifying our processes...

Thanks again!


All times are GMT -5. The time now is 07:49 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi