Subject:
|
SetWatch() only accepts constants
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Tue, 7 Aug 2001 03:12:21 GMT
|
Viewed:
|
2329 times
|
| |
| |
I just wrote a task and function that cause the RCX to receive data from the
PC and then set the time on the RCX using SetWatch(). Unfortunately, I
didn't realize that SetWatch() only accepts constants. NQC complained when
integer variables were passed. Is this because the special SetWatch()
opcode only accepts embedded constants and not references to memory
variables? That probably is what is going on, but if not, would it be
possible to change it so it can accept variables?
It sure would have been useful to set the system time from the computer. It
doesn't make a lot of sense to have a function that sets the system time
only except an embedded constant. "You must only run this program at
Midnight for the system time to be set properly."
|
|
Message has 3 Replies: | | RE: SetWatch() only accepts constants
|
| Instead of sending ByteCodes from the PC and getting the RCX to interpret them, you can construct and send the SetWatch() OpCode plus the correct "constant" time and send it through Spirit.OCX (or directly, depending of the platform). (...) (23 years ago, 7-Aug-01, to lugnet.robotics.rcx.nqc)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|