To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 10934
10933  |  10935
Subject: 
Re: Spirit.ocx in VC++
Newsgroups: 
lugnet.robotics
Date: 
Sun, 5 Mar 2000 22:08:16 GMT
Original-From: 
Len Holgate <len.holgate@dial=AntiSpam=.pipex.com>
Viewed: 
2771 times
  
Well done!

I expect the datalog data is just represented in this way for ease of use by
VB programmers.

----- Original Message -----
From: iant <iant@libero.it>
To: <lego-robotics@crynwr.com>
Sent: Sunday, March 05, 2000 8:13 PM
Subject: Re: Spirit.ocx in VC++


> Hi Steve, Len and All,
> 
> I was closer to the solution than I thought!
> 
> The code I posted this morning was correct.
> What I missed was the format of the datalog, which is very
> hard to understand from the docs of spirit.ocx.
> 
> After hacking around for a while I found that the format of the
> array of 2-bytes integers that represents the datalog is:
> 
> *- header -*
> 1   255
> 2   0
> 3   number of data logged
> 
> *- 1st logged value -*
> 4   type of data source      (0=variable, 1=timer, 9=sensor)
> 5   number of data source    (0-31 variables, 0-3 timers, 0-2 sensors)
> 6   logged value
> 
> *- 2nd logged value -*
> 8   type of data source
> 9   number of data source
> 10  logged value
> 
> *- 3rd logged value -*
> 11  ... and so on ...
> 
> 
> For example:
> 
> 255
> 0
> 3
> 1
> 0
> 10
> 9
> 1
> 765
> 0
> 3
> 85
> 
> is the raw array for the following datalog:
> 
>    Timer_0:  10
>   Sensor_2: 765
> Variable_3:  85
> 
> Pretty easy, isn't it?
> 
> Now a question arises: why use 2 2-byte integers to address the data
> source, when a 6-bit integer would have been more than enough???
> I hope this is only a format given by UploadDatalog method, and in
> the RCX the datalog is stored in a more compact way, because it is
> an *amazing* waste of memory!
> 
> 
> Bye,
> 
>       Antonio



Message is in Reply To:
  Re: Spirit.ocx in VC++  [DAT]
 
Hi Steve, Len and All, I was closer to the solution than I thought! The code I posted this morning was correct. What I missed was the format of the datalog, which is very hard to understand from the docs of spirit.ocx. After hacking around for a (...) (27 years ago, 5-Mar-00, to lugnet.robotics)

4 Messages in This Thread:

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

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