Control new with airspeed sensor - compiling warning

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Control new with airspeed sensor - compiling warning

agressiva
After upgraded the pprz i get this error when using control_new with use_airspeed




firmwares/fixedwing/guidance/guidance_v_n.c: In function 'v_ctl_set_airspeed':
firmwares/fixedwing/guidance/guidance_v_n.c:323:9: warning: declaration of 'err_vz' shadows a global declaration [-Wshadow]
   float err_vz = v_ctl_climb_setpoint - stateGetSpeedEnu_f()->z;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:119:9: warning: shadowed declaration is here [-Wshadow]
   float err_vz;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:324:9: warning: declaration of 'd_err_vz' shadows a global declaration [-Wshadow]
   float d_err_vz = (err_vz - last_err_vz) * AIRSPEED_LOOP_PERIOD;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:120:9: warning: shadowed declaration is here [-Wshadow]
   float d_err_vz;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:335:9: warning: declaration of 'err_airspeed' shadows a global declaration [-Wshadow]
   float err_airspeed = v_ctl_auto_airspeed_setpoint - *stateGetAirspeed_f();
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:121:9: warning: shadowed declaration is here [-Wshadow]
   float err_airspeed;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:336:9: warning: declaration of 'd_err_airspeed' shadows a global declaration [-Wshadow]
   float d_err_airspeed = (err_airspeed - last_err_as) * AIRSPEED_LOOP_PERIOD;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:122:9: warning: shadowed declaration is here [-Wshadow]
   float d_err_airspeed;
         ^

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
Reply | Threaded
Open this post in threaded view
|

Re: Control new with airspeed sensor - compiling warning

flixr
Administrator
Hi Eduardo,

in v5.4 and master these variables are local to the v_ctl_set_airspeed function, see sw/airborne/firmwares/fixedwing/guidance/guidance_v_n.c line 283
So it must be some changes you made...

Cheers, Felix

On Sun, Feb 8, 2015 at 2:58 AM, Eduardo lavratti <[hidden email]> wrote:
After upgraded the pprz i get this error when using control_new with use_airspeed




firmwares/fixedwing/guidance/guidance_v_n.c: In function 'v_ctl_set_airspeed':
firmwares/fixedwing/guidance/guidance_v_n.c:323:9: warning: declaration of 'err_vz' shadows a global declaration [-Wshadow]
   float err_vz = v_ctl_climb_setpoint - stateGetSpeedEnu_f()->z;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:119:9: warning: shadowed declaration is here [-Wshadow]
   float err_vz;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:324:9: warning: declaration of 'd_err_vz' shadows a global declaration [-Wshadow]
   float d_err_vz = (err_vz - last_err_vz) * AIRSPEED_LOOP_PERIOD;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:120:9: warning: shadowed declaration is here [-Wshadow]
   float d_err_vz;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:335:9: warning: declaration of 'err_airspeed' shadows a global declaration [-Wshadow]
   float err_airspeed = v_ctl_auto_airspeed_setpoint - *stateGetAirspeed_f();
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:121:9: warning: shadowed declaration is here [-Wshadow]
   float err_airspeed;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:336:9: warning: declaration of 'd_err_airspeed' shadows a global declaration [-Wshadow]
   float d_err_airspeed = (err_airspeed - last_err_as) * AIRSPEED_LOOP_PERIOD;
         ^
firmwares/fixedwing/guidance/guidance_v_n.c:122:9: warning: shadowed declaration is here [-Wshadow]
   float d_err_airspeed;
         ^

_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel