To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / *2554 (-10)
  Re: Converting a float to an integer
 
It looks like xdist and ydist are integers. You divide an integer by an integer, the answer is an integer. For example, if xdist=5 and ydist=10, you have 5/10, the answer is 0 (with a remainder of 5). So, if you do the multiply first, you will be (...) (22 years ago, 13-May-02, to lugnet.robotics.rcx.legos)
 
  RE: Converting a float to an integer
 
I have built a plotter and want to draw a diagonal line of varying angles. It requires one motor to run slower then the other at a ratio based on the distance it has to travel compared to the other one. So I do something like this xspeed = (int) (...) (22 years ago, 9-May-02, to lugnet.robotics.rcx.legos)
 
  Re: egcs compiler - float problems?
 
(...) I have not tried to compile this, but one thing that looks suspicious is that you are using doubles. Doubles are not supported. The compiler I have (some old version of GCC) treats doubles and floats as the same type. The compiler you're using (...) (22 years ago, 10-May-02, to lugnet.robotics.rcx.legos)
 
  egcs compiler - float problems?
 
Can someone using the egcs compiler suite test the following code? It seems it doesn't compile under egcs. int main(int argc, char *argv[]) { double foo = 1.0; return foo > 0.1 ? 0 : 1; } Compiles fine under gcc 3.0.3. Regards, Michael (22 years ago, 10-May-02, to lugnet.robotics.rcx.legos)
 
  More problems with floats
 
When I try to compile a program containing the following function: bool tr_guard_foo_loc2_t0() { return getVarVal(&var_foo_cl) >= 0.1; } I get this error: /tmp/ccyEbqnS.s: Assembler messages: /tmp/ccyEbqnS.s:237: Error: cannot create floating-point (...) (22 years ago, 10-May-02, to lugnet.robotics.rcx.legos)
 
  Re: semaphores
 
Would it be possible for you to send the entire source? I would like to see how it interacts with the rest of the program. Thanks for your help. "kenneth johansen" <kennethj@stud.cs.uit.no> wrote in message news:3CDAC372.34D72C....uit.no... (...) (...) (22 years ago, 10-May-02, to lugnet.robotics.rcx.legos)
 
  Re: ___cmpsi2
 
(...) OK, I planned to test 0.2.6; this is the right moment to do it. (...) Do you know why? (I'm just curious) (...) Thank you very much. This was really important to me. Eric (22 years ago, 9-May-02, to lugnet.robotics.rcx.legos)
 
  Re: ___cmpsi2
 
(...) Don't know. Just made a quick download from sourceforge. Didn't install, just looked through with mc. Seems that in the mint-lib, both cmp2-files are missing. And no printf in the c library path. Regards, Michael (22 years ago, 9-May-02, to lugnet.robotics.rcx.legos)
 
  Re: ___cmpsi2
 
(...) How did *that* happen?!!?!? Just curious. Somebody should point a finger, just for yuks. -Kekoa (22 years ago, 9-May-02, to lugnet.robotics.rcx.legos)
 
  Re: semaphores
 
a short example: #include <semaphore.h> // for semaphore opperations // global buffer, used to store incoming messages. // the buffer is checked by the application waiting for the message. struct inn_msg{ char *msg; sem_t lock; }; //create a (...) (22 years ago, 9-May-02, to lugnet.robotics.rcx.legos)


Next Page:  5 more | 10 more | 20 more

Redisplay Messages:  All | Compact

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