Go to Post The strive for the Chairman's award is by far more important than the award. - Pavan Dave [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-2015, 14:38
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 82
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: VEX Ultrasonic Sensor

Here's your problem:

Code:
public void robotInit() {
        ...stuff...
        ultra.setAutomaticMode(isEnabled()); <---
        ultra.setEnabled(isEnabled()); <---
        ...other stuff...
}
When robotInit is run, the robot is disabled. That means that isEnabled() will return false, which means your ultrasonic sensor is never turned on, along with automatic mode being set to false. I'd suggest just changing the lines to ultra.setEnabled(true) and ultra.setAutomaticMode(true).

Last edited by Oromus : 13-02-2015 at 14:43.
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 09:11.

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