paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] coding problems with multilib


From: Chris Efstathiou
Subject: [Paparazzi-devel] coding problems with multilib
Date: Mon, 22 Oct 2012 12:13:56 +0300

Hi.
I now face a strange problem with the airborne code.
I have made a lot of testing and i am sure this is where the problem is.
If i write in a module c file the following code i always get a nice 0 because somehow CAM_MAN_MAX is taken to be 0.
(CAM_MAN_MAX is defined in the airframe file and i don't get any errors whatsoever).
 
if (cam_pan_c > RadOfDeg(CAM_MAN_MAX)){
   cam_pan_c = CAM_MAN_MAX;
}


If i substitute CAM_MAN_MAX with a number like this it works fine/

if (cam_pan_c > RadOfDeg(90)){
   cam_pan_c = 90;

Now the strange part is that the code works fine when compiled for the aircraft because i can move the servos fine but not in simulation.
Also the same code works in simulation when i use the old compiler (not multilib) from a backup i have.
Another problem i have is that if i set a variable like x=100; in a place it does not work but if i move this line elsewhere it works and it is not a problem of overwriting the variable somewhere in the road.
It looks like the compiler falsely decides that this line can be omitted for optimization.....
Any help welcomed because this drives me nuts....
Chris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]