To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.scoutOpen lugnet.robotics.scout in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Scout / 82
81  |  83
Subject: 
Re: Scout poweroff time out?
Newsgroups: 
lugnet.robotics.rcx.nqc, lugnet.robotics.scout
Date: 
Mon, 2 Oct 2000 17:54:41 GMT
Viewed: 
19 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.


What other features will work? The BatteryLevel() one? I think we need to
have a look at the rcx2 commands and see what's working for the Scout.

Also, what does the Scout API include with the program? I know in the RCX it
turns all motor ports forward and full power. If it's eating up much valuable
space it might be better to not include anything for the scout?

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?
 
(...) The SetSleepTime() and SleepNow() thing was just sloppiness on my part when reorganizing the NQC API file. Those opcodes are clearly documented in the Scout SDK. I don't think we have to hunt around for undocumented features - just verify that (...) (24 years ago, 3-Oct-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