| | Re: The BrickOS Task Manager Michael Purvis
|
| | (...) Sorry, I'm still just not getting it at all. I have type errors all over the place trying to pass arguments to my task. Could someone please simply email me or post an example of a program that starts, runs two or more threads, and will (...) (21 years ago, 10-Jan-04, to lugnet.robotics.rcx.legos)
|
| | |
| | | | Re: The BrickOS Task Manager Steve Hassenplug
|
| | | | (...) This works. Steve ---- #include <unistd.h> #include <dbutton.h> #include <dmotor.h> int MotorSpeed = 0; int RunMotor() { while (!shutdown_requested()) { motor_a_dir(MotorSpeed); } return 0; } int CheckButton() { while (!shutdown_requested()) { (...) (21 years ago, 10-Jan-04, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: The BrickOS Task Manager Michael Purvis
|
| | | | | (...) Thank you very much. That was exactly what I needed. Very much appreciated. Mike (21 years ago, 10-Jan-04, to lugnet.robotics.rcx.legos)
|
| | | | | |
| | | | | | Re: The BrickOS Task Manager Michael Purvis
|
| | | | (...) Thank you again for the help, but unfortunately it only compiles when saved as a '.c' file. Some of my code depends pretty heavily on classes... is there any easy change to make this work as object oriented code? *just spent two hours trying (...) (21 years ago, 12-Jan-04, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: The BrickOS Task Manager Steve Hassenplug
|
| | | | (...) Were you able to compile it as is? What are you trying to do? What errors are you getting? I tested that with version xx.09, not the latest one. Steve (21 years ago, 13-Jan-04, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: The BrickOS Task Manager Michael Purvis
|
| | | | (...) When saved as multi.c, but not when saved as multi.cpp (...) Start multiple tasks within a program that uses objects. I could rewrite a number of parts to use structs instead, but I just wanted to check that there wasn't some easy solution. (...) (21 years ago, 13-Jan-04, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: The BrickOS Task Manager Mark Riley
|
| | | | (...) C++ is more particular with types than regular ol' C. However, I think BrickOS's definition of NULL in mem.h is incorrect (as this was causing one of the problems in the execi call). IMO, it should be defined like so: #ifdef __cplusplus (...) (21 years ago, 13-Jan-04, to lugnet.robotics.rcx.legos)
|
| | | | |