View unanswered posts | View active topics It is currently Mon Dec 22, 2014 3:28 pm






Reply to topic  [ 3 posts ] 
I need help 
Author Message
Rookie

Joined: Thu Apr 12, 2012 9:06 am
Posts: 1
Post I need help
Is there anyway that i could set nPgmTime to be 0 in the coding,
ie: untilSonarLessThan(6.9,sonar);
(insert code here)


Thu Apr 12, 2012 9:09 am
Profile
Moderator
Moderator
User avatar

Joined: Tue Sep 14, 2010 9:19 pm
Posts: 496
Post Re: I need help
what are you tying to accomplish? What is "untilSonarLessThan(6.9,sonar);" supposed to do? If you need to use timing, I suggest you use timers instead of trying to change nPgmTime.

_________________
sudo rm -rf /


Thu Apr 12, 2012 11:14 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 406
Post Re: I need help
The nPgmTime value is designed to always say how long the current program has been running, and is therefore not user resettable. You will want to use the user-controllable timers, like magicode said: http://www.education.rec.ri.cmu.edu/products/teaching_robotc_cortex/reference/hp_timers.pdf

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Apr 16, 2012 11:46 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.