| | legOS limitation
|
|
Hey, this is a small but frustrating one. This is in legOS 1.7 but I beleive it will still be in 2.0 as it's caused by the 1 priority to a task requirement. If you write code like the following: while(1){ wait(for something); kill(t1); t1 = (...) (25 years ago, 27-Oct-99, to lugnet.robotics.rcx.legos)
|
|
| | Re: LegOS 0.2.0a multi-threading problem
|
|
(...) If ON/OFF is desired while programs run, just drop the if. If ON/OFF isn't to work while programs run, it has to be this: if(nb_tasks<=3) { killall(PRIO_HIGHEST); return 0; // killall doesn't kill self } break; What does standard firmware do? (...) (25 years ago, 27-Oct-99, to lugnet.robotics.rcx.legos)
|
|
| | Re: LegOS 0.2.0a multi-threading problem
|
|
(...) Following up to myself, but here's the error (kernel/program/.c) lines 255-260: case KEY_ONOFF: // works only if no programs are running. if(nb_tasks<=3) { killall(PRIO_HIGHEST); } return 0; ^^^^ This should be 'break'. The way the code is (...) (25 years ago, 27-Oct-99, to lugnet.robotics.rcx.legos)
|
|
| | IR questinos and more
|
|
Hi All. I'm trying to build an IR proximity sensor with LegOS, by using the on-board transmitter and light sensor. I'm having problems figuring out how to send data, however. I tried using lnp_logical_write(), but 'cu -l /dev/ttyS0' doesn't show any (...) (25 years ago, 27-Oct-99, to lugnet.robotics.rcx.legos)
|
|
| | Re: LegOS 0.2.0a multi-threading problem
|
|
(...) That would be nice, actually. I have only one problem with stability - every once in a while, the "Run" key stops working, and all the other keys as well (don't remember exactly, but I think that's how it is). The program keeps running (...) (25 years ago, 27-Oct-99, to lugnet.robotics.rcx.legos)
|
|
| | RE: fast firmware downloader
|
|
(...) Count me in. I'm ditching the Tcl interface - it's just too damn goofy! A standard firmware downloader would be great - especially if it ran on all platforms. As far As I know, Dave Baum is the only guy here who has got a downloader for the (...) (25 years ago, 27-Oct-99, to lugnet.robotics.rcx.legos, lugnet.robotics.rcx, lugnet.robotics.rcx.pbforth)
|
|
| | Re: fast firmware downloader
|
|
(...) If there's interest in a stand-alone firmware downloader running on the Mac, please let me know. I can certainly add the approriate quad-speed stuff into NQC, and can also make a stand-alone version if Mac users are using pbFORTH or something (...) (25 years ago, 27-Oct-99, to lugnet.robotics.rcx.legos, lugnet.robotics.rcx)
|
|
| | Re: LegOS 0.2.0a multi-threading problem
|
|
Hi, yes, currently, you'll have to make main() your first function. version 0.2.1 will support arbitrary starting offsets. could you report about the stability of repeated program runs? if this works fine, I'll change the ON/OFF behaviour to (...) (25 years ago, 26-Oct-99, to lugnet.robotics.rcx.legos)
|
|
| | Re: LegOS 0.2.0a multi-threading problem
|
|
(...) [snip] Heh. I've spent 2 days on this, so I know how you feel :). main() must be the first function in your source file, otherwise really weird stuff happens. -- Regards, Modemch (25 years ago, 25-Oct-99, to lugnet.robotics.rcx.legos)
|
|
| | Re: H8 tools problems on Linux
|
|
(...) Hi! I got the precompiled tools from the LegOS page, tried with both the 'old' and the 'new' set... by the way, the Windows version works fine. Not 0.2.0, but that's not the tools' fault... thanks for all the help Vlad (25 years ago, 26-Oct-99, to lugnet.robotics.rcx.legos)
|