Go to Post Baker, you're making my head hurt and it's only August!!!! - Rich Kressly [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-02-2012, 15:48
Waltonruler5 Waltonruler5 is offline
Registered User
FRC #1591
 
Join Date: Jan 2012
Location: Greece, Rochester
Posts: 8
Waltonruler5 is an unknown quantity at this point
Spike Relays won't recognize values

I'm trying to program two intake motors for our feed system using spike relays. I'm using the command template shown by BradAMiller. I defined each motor as a spike and mapped it to the proper channel. I create the method intakeOn and go to set the value but it tells me there's an error. I type
intakeMotor1.set(Relay.kForward);
and it tells me that the symbol "kForward" is not found in the class.

I programmed another subsystem to use the spikes without difficulty but we switched them to victors so I can't look back at the code.
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2012, 15:53
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Spike Relays won't recognize values

Try:

Relay.Value.kForward

instead of Relay.kForward
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2012, 16:01
Waltonruler5 Waltonruler5 is offline
Registered User
FRC #1591
 
Join Date: Jan 2012
Location: Greece, Rochester
Posts: 8
Waltonruler5 is an unknown quantity at this point
Re: Spike Relays won't recognize values

Lol I just figured that out myself. I tried it before without success but it worked this time. Thanks though.
Reply With Quote
Reply


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 10:48.

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