| | Possible bug? Simple light sensor condition checking. Timothy Su
|
| | I tried my own skill on writing a program for the included lego test pad (RIS 2.0), and I discovered something weird. The following code does set the conditions right, but the following code doesn't set the conditions right if I comment out the (...) (17 years ago, 16-Jul-07, to lugnet.robotics.rcx.legos)
|
| | |
| | | | Re: Possible bug? Simple light sensor condition checking. Steve Hassenplug
|
| | | | I use BrickOS (LegOS) but I'm not expert in the inner workings. The code you have here appears fine to me. So, it may be a bug in BrickOS, or a problem elsewhere in your code. I will say I've ran into some interesting things when using tasks. (...) (17 years ago, 16-Jul-07, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: Possible bug? Simple light sensor condition checking. Jochen Hoenicke
|
| | | | (...) It looks to me like the c compiler optimized the assignment to the variable away, since there is no external method call (shutdown_requested() is just a macro). (...) You should make this volatile int offonpad = 0; (...) You should also put an (...) (17 years ago, 16-Jul-07, to lugnet.robotics.rcx.legos)
|
| | | | |