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 / 267
266  |  268
Subject: 
Re: Spybot Studies: display an 8-bit value
Newsgroups: 
lugnet.robotics.spybotics
Date: 
Fri, 7 Nov 2003 20:31:45 GMT
Viewed: 
5714 times
  
In lugnet.robotics.spybotics, John Hansen wrote:
   In lugnet.robotics.spybotics, Brian B. Alano wrote:
   Now if I could only pass the parameter on the stack to a subroutine, I wouldn’t have to inline all this code.... :)

I know I’ve seen someone else do this already, but I can’t find the link.


Mark Riley did this using MindScript but I don’t recall having already seen the equivalent in NQC.

http://news.lugnet.com/robotics/spybotics/?n=56

In case anyone was wondering (yeah, sure :-), this line in my original post:
led[iDisplay] = (x & 0x17) | ((x & 8) * 4) | ((x & 32) / 4)
rearranges the bits so that the lower 6 bits can easily be read left to right (while looking at the bot from the front) with the MSB being the outer green LED and the LSB being the opposite outer red LED. If you’re fluent in binary, you can read the value pretty quickly. I assume the bit rearrangement would be needed for NQC also, but I haven’t tried it yet.

Mark



Message is in Reply To:
  Re: Spybot Studies: display an 8-bit value
 
(...) Mark Riley did this using MindScript but I don't recall having already seen the equivalent in NQC. (URL) than use a #define macro (speaking of which, I need to fix the syntax highlighting of preprocessor macros to account for multiple lines) I (...) (21 years ago, 7-Nov-03, to lugnet.robotics.spybotics)

4 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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