To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 798
797  |  799
Subject: 
Re: Scout poweroff time out?
Newsgroups: 
lugnet.robotics.rcx.nqc, lugnet.robotics.scout
Date: 
Sat, 30 Sep 2000 18:54:54 GMT
Viewed: 
3708 times
  
Dave Baum wrote:

In article <dbaum-D186BD.01523530092000@lugnet.com>, Dave Baum
<dbaum@spambgoneenteract.com> wrote:

Looking at the Scout SDK, I think it does support the same sleep time
command as the RCX - although perhaps not from within a program.  There
are two things to try:

nqc -sleep 0

or

add the following function to your program and call it (with t=0)

   void SetSleepTime(const int t)   { asm { 0xb1, t }; }


I just verified that both of these work.  I'll fix the API for the next
NQC release, but in the meantime, you can always add the following
functions to your Scout programs:

void SetSleepTime(const int t)   { asm { 0xb1, t }; }
void SleepNow() { asm { 0x60 }; }

They behave identially to their counterparts for the RCX and Cybermaster.

In general, I find I just use the NQC command to set the sleep time
(with -sleep) rather than creating a special nqc program for the rcx to
do it.


You know, I tried that. It didn't work. But then I'm using my new editor
(that I'm working on) and had forgotten to set the brick type with EACH
command to NQC. I only had it set to compile/Download. So the scout wouldn't
be 'unlocked' until I had downloaded something. Thank goodness the commands
work!
I was about to go mad. (Visions of hacking a lego remote to auto send a
'ping' every 10 minutes.)

Would it be possible to add a command option to total the needed bytes for a
program and compare it against the target? Compile with this option and it
would tell you how much you had left or whatnot? It was quite the surprise to
see the mem full error after adding one command...

Dean
--
Coin-Op's For Sale!: http://www.akasa.bc.ca/tfm/coin-op.html
Dean's Lego Workshop: http://www.akasa.bc.ca/tfm/lego_wr.html
Vancouver Lego Club: http://www.akasa.bc.ca/vlc



Message has 1 Reply:
  Re: Scout poweroff time out?
 
(...) Possible, yes, but I'd prefer not to. The command line is already too complex. I might consider adding the information as part of the regular program download message (with the battery level). For devices other than Scout, there isn't a fixed (...) (24 years ago, 30-Sep-00, to lugnet.robotics.rcx.nqc, lugnet.robotics.scout)

Message is in Reply To:
  Re: Scout poweroff time out?
 
(...) I just verified that both of these work. I'll fix the API for the next NQC release, but in the meantime, you can always add the following functions to your Scout programs: void SetSleepTime(const int t) { asm { 0xb1, t }; } void SleepNow() { (...) (24 years ago, 30-Sep-00, to lugnet.robotics.rcx.nqc, lugnet.robotics.scout)

10 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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR