To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.spyboticsOpen lugnet.robotics.spybotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Spybotics / 257
256  |  258
Subject: 
Re: Spybot studies: SetTxDirection() confusion
Newsgroups: 
lugnet.robotics.spybotics
Date: 
Fri, 7 Nov 2003 04:53:53 GMT
Viewed: 
5645 times
  
In lugnet.robotics.spybotics, Brian B. Alano wrote:
John,

I noticed the SetTxDirection() function in your mana_control.nqc program. I
thought it might be useful for my project, so it became my next subject of study.
  The spy.nqh shows this:

   #define TX_DIRECTION_FRONT_LEFT 0
   #define TX_DIRECTION_FRONT_RIGHT 1
   #define TX_DIRECTION_BACK 2
   #define TX_DIRECTION_HIGH_POWER 3
   #define TX_DIRECTION_PC 4

but in the 2.5 SDK, I can only find

[18] Direction
0 == high power
1 == PC

This portion of the Spybot NQC API is under substantial revision... :-)  I based
the constants on those found in Spybot.h which are apparently just plain wrong.
The current version of my spy.nqh file has


  #define SERIAL_CHANNEL_HIGH_POWER 0
  #define SERIAL_CHANNEL_PC 1
  #define SERIAL_CHANNEL_FRONT_LEFT 2
  #define SERIAL_CHANNEL_FRONT_RIGHT 3
  #define SERIAL_CHANNEL_BACK 4

  #define SerialChannel() @(0x210012)
  __nolist void SetSerialChannel(const int &c) { Set(SerialChannel(), c); }

My understanding is that there are multiple IR emitters (which is how a Spybot
can tell the orientation of another Spybot).  My guess is front left, front
right, and back are either not implemented in the firmware or we don't know the
correct numbers to use yet.  Where there are discrepencies between the Spybot.h
file and the SDK PDF document I have now changed the API to match the PDF (but
it is known to have problems at times as well).  I am working on finalizing the
contents of spy.nqh so that it can be added (hopefully soon) to the official
built-in NQC API (along with documentation in NQC_GUIDE.PDF and in BricxCC).

I'm awfully glad there is at least one other person out there actively trying
out these functions.  Shall I post updates here as I go along or do you think it
would be better to wait until I think I'm mostly through?  I'm inclined to think
the more eyes that see the code sooner the better.  But it might get confusing
to have too many iterations posted here.

John Hansen



Message has 2 Replies:
  Re: Spybot studies: SetTxDirection() confusion
 
(...) Yes, there are multiple IR emitters. Two in front at nearly 90 degree angles, one in back, and a high-power one pointing up. Turns out my camera was only picking up the high-power emitter. I tried again with a different camera (the Vision (...) (21 years ago, 7-Nov-03, to lugnet.robotics.spybotics)
  Re: Spybot studies: SetTxDirection() confusion
 
(...) How *does* the Spybot know the orientation (the ROM SDK calls it "aspect") of another Spybot? My (casual) observations indicate that all three emitters are on simultaneously and synchronously. How does the observing Spybot identify which one (...) (21 years ago, 8-Nov-03, to lugnet.robotics.spybotics)

Message is in Reply To:
  Spybot studies: SetTxDirection() confusion
 
John, I noticed the SetTxDirection() function in your mana_control.nqc program. I thought it might be useful for my project, so it became my next subject of study. The spy.nqh shows this: #define TX_DIRECTION_FRONT_LEFT 0 #define (...) (21 years ago, 7-Nov-03, to lugnet.robotics.spybotics)

9 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