|
some suggestions:
1) random_delay = random()/1000000;
LegOS uses 16 bit integers, meaning the largest value an integer can have is
something like 65535. The above statement is meaningless
2)
> kill (left_thread);
> kill (right_thread);
> kill (speed_thread);
If you kill a thread, make sure it's still a valid thread (i.e. still
running). undefined behavior will result from killing an invalid thread.
3)
> motor_a_speed (255);
> motor_b_speed (255);
> motor_c_speed (255);
I advise against using hard-coded numbers like this, on a basis of form.
Someone must have told you this in the past.
"mike mcfarlane" <mcfarlane_mike@hotmail.com> wrote in message
news:GpzuHJ.8s3@lugnet.com...
> Hi again, I'm now totally stuck with this problem. I've spent all day at it,
> stepping through the
> code line by line with key presses. I've marked the point that the code
> appears to hang in
> left_control_task (). Someone please help, please.
> Thanks
> Mike
>
|
|
Message has 1 Reply: | | Re: threads
|
| Thanks Albert (...) still (...) How do I check this? There are no other tasks that can kill threads apart from this one. I also checked process IDs after creation and before killing. Best regards, mike (23 years ago, 16-Jan-02, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | Re: threads
|
| Hi again, I'm now totally stuck with this problem. I've spent all day at it, stepping through the code line by line with key presses. I've marked the point that the code appears to hang in left_control_task (). Someone please help, please. Thanks (...) (23 years ago, 15-Jan-02, to lugnet.robotics.rcx.legos)
|
18 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|