mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-04 15:08:28 -04:00
d9ab3baf84
rename all public data members of RC_Channnels with leading underscore and make all data members private. Provide get_xx and set_xx methods for access Rationale: RC_Channel is a complicated class, which combines several functionalities dealing with stick inputs in pwm and logical units, logical and actual actuator outputs, unit conversion etc, etc The intent of this PR is to clarify existing use of the class. At the basic level it should now be possible to grep all places where private variable is set by searching for the set_xx function. (The wider purpose is to provide a more generic and logically simpler method of output mixing. This is a small step) add function to save radio trim (expression where c is an object of type RC_Channel) old public member(int16_t) get function -> int16_t set function (int16_t) (expression where c is an object of type RC_Channel) c.radio_in c.get_radio_in() c.set_radio_in(v) c.control_in c.get_control_in() c.set_control_in(v) c.servo_out c.get_servo_out() c.set_servo_out(v) c.pwm_out c.get_pwm_out() // use existing c.radio_out c.get_radio_out() c.set_radio_out(v) c.radio_max c.get_radio_max() c.set_radio_max(v) c.radio_min c.get_radio_min() c.set_radio_min(v) c.radio_trim c.get_radio_trim() c.set_radio_trim(v); // other c.min_max_configured() // return true if min and max are configured c.save_radio_trim() // save radio trim to eeprom |
||
---|---|---|
.. | ||
examples | ||
RC_Channel_aux.cpp | ||
RC_Channel_aux.h | ||
RC_Channel.cpp | ||
RC_Channel.h |