awenzhong / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

coding issue in arduplane #682

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
        There is an issue I don't understand. In calc_nav_pitch() there is a command
        nav_pitch = -g.pidNavPitchAirspeed.get_pid(airspeed_error, dTnav); (2 parameters call)
        However, get_pid definition is
        PID::get_pid(int32_t error, uint16_t dt, float scaler) (3 parameters definition)
        How can it be like this? Can anyone explain me?

Original issue reported on code.google.com by minht...@gmail.com on 9 Jul 2012 at 8:07

GoogleCodeExporter commented 8 years ago
C++ allows setting of parameter defaults when parameters are on the end of the 
parameter list.

Default of 1.0 is set for scaler in PID.h.

Original comment by Mr.Challinger@gmail.com on 19 Jul 2012 at 8:39

GoogleCodeExporter commented 8 years ago
Thank you, Mr. Challinger, it's all right now!

Original comment by minht...@gmail.com on 19 Jul 2012 at 9:17

GoogleCodeExporter commented 8 years ago

Original comment by tridg...@gmail.com on 17 Aug 2012 at 5:13