Go to Post If you want to win, steal from the best, invent the rest. - Michael Corsetto [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
  #5   Spotlight this post!  
Unread 08-04-2014, 16:27
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Re: Using multiple classes in java to control one pwm

Sorry, the one I was using as map was outputmap. I called it map in all the events though. (Map is inputmap, will go ahead and rename it.)

Spoiler for outputmap:


package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.AnalogChannel;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Talon;

public class outputmap
{
//output
public Talon leftdrive=new Talon(1);
public Talon rightdrive=new Talon(2);

public Compressor compress=new Compressor(1, 1);

public Talon loader=new Talon(3);
public Solenoid shootopen=new Solenoid(1);
public Solenoid shootclose=new Solenoid(2);
public DigitalInput winchstopper=new DigitalInput(2);
public DigitalInput winchstarter=new DigitalInput(3);

public Solenoid largeopen=new Solenoid(5);
public Solenoid largeclose=new Solenoid(6);

public Solenoid smallopen=new Solenoid(3);
public Solenoid smallclose=new Solenoid(4);

public Talon pickup=new Talon(4);

//inputs
public AnalogChannel distance=new AnalogChannel(1);

//constants
public int reversetimer=2000;
public int shoottimer=1000;
public int pistontimer=1000;
public int shootdistance=36;
public int slowdistance=24;
public int stopdistance=12;
}



Also, how do I make it public so I don't have to write:
Code:
import edu.wpi.first.wpilibj.templates.outputmap;

//inside of class
outputmap map=new outputmap();
every time?
__________________
Spoiler for gif:
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:08.

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