I don't always. Normally, I have my tasks completely independent of each other (no mutexes). Normally, my tasks consist of a while(true) loop, and I don't always have a wait in the loops. IIRC, I have never experienced any issues with this method.doc-helmut wrote:...So again my question:
MUST I FOR SURE insert at least a Wait(1) to ALL task loops (also to the very fast ones) for a safe scheduling or not ?
NXC: wait(1) for safe task (scheduling) control needed?
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXC: wait(1) for safe task (scheduling) control needed?
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NXC: wait(1) for safe task (scheduling) control needed?
thx, matt + Xander!
- any other observations about that issue ("MUST I - or not)?
ps:- but now it's supposed to be VERY EARLY in Michigan, isn't it? ;)
- any other observations about that issue ("MUST I - or not)?
ps:- but now it's supposed to be VERY EARLY in Michigan, isn't it? ;)
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXC: wait(1) for safe task (scheduling) control needed?
You're welcome.doc-helmut wrote:thx, matt + Xander!
- any other observations about that issue ("MUST I - or not)?
ps:- but now it's supposed to be VERY EARLY in Michigan, isn't it?
It is about 4:30 am, so a few hours before sunrise. My dad will probably be getting up soon. Normally, I go to bed half an hour or an hour after he gets up.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NXC: wait(1) for safe task (scheduling) control needed?
John did once say that it is a good idea to use Yield(), but he may have changed the firmware so this is not necessary anymore, and Yield() is just an "artifact" from the stone age of NXC .
(Currently, we're in the extremely high-tech middle ages. )
(Currently, we're in the extremely high-tech middle ages. )
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: NXC: wait(1) for safe task (scheduling) control needed?
my question was not about "a good idea" but about a definite answer to "unnecessarily needed or not"
Re: NXC: wait(1) for safe task (scheduling) control needed?
Probably not needed with the new EFs, but we'll need John Hansen to confirm this.doc-helmut wrote:my question was not about "a good idea" but about a definite answer to "unnecessarily needed or not"
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Re: NXC: wait(1) for safe task (scheduling) control needed?
well, "probably" is not the answer that I was looking for...
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXC: wait(1) for safe task (scheduling) control needed?
I don't think it is. Why don't you just try an example program, and see for yourself? Write a program that uses several tasks at the same time, and don't use waits. See what happens. I don't think the NXT will explode if it doesn't work.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NXC: wait(1) for safe task (scheduling) control needed?
I can't test it in the environment in which I actually need to have it - in my case it's the 14-20 task subsumption program. I will never know if 1 ppm of the BT communications and/or I2C sensor readings and/or priority calculations are faulty or not if I sacrifice all the Wait(1) in all tasks.
But Xander's reply appears to me to be the most confident one so far.
But Xander's reply appears to me to be the most confident one so far.
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXC: wait(1) for safe task (scheduling) control needed?
Well, that is why I recommended a test program. Often, I write a program just to test a single function or concept.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Who is online
Users browsing this forum: No registered users and 0 guests