Go to Post To me, the changing rules are a big part of the fun. If the rules stayed the same year to year, robots would start to look the same. That would be boring. - Richard Wallace [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 16-02-2012, 12:55
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: Robot Nightmare!

In your operatorControl code, while you hold down one button, you are in an inner loop and not sending updates to the other motor.

One way to fix it is to get rid of your inner loops. Instead, calculate values for desired state variables of the conveyor and launcher based on the buttons. If no buttons pressed, set desired states to default state (OFF?). Then actually set the motors/relays to the desired state (unconditionally, not just when button pressed).
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 12:47.

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