Improve parameter documentation, it still does not work, but is an improvement.

I just do not understand why these parameters do not appear in Mission planner :(
This commit is contained in:
Amilcar Lucas 2012-07-17 23:32:30 +02:00
parent c0f8f6251b
commit 1da0ce20ce
3 changed files with 53 additions and 28 deletions

View File

@ -6,7 +6,6 @@
#include <AP_Mount.h>
const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = {
// index 0 was used for the old orientation matrix
// @Param: MODE
// @DisplayName: Mount operation mode
// @Description: Camera or antenna mount operation mode
@ -17,27 +16,27 @@ const AP_Param::GroupInfo AP_Mount::var_info[] PROGMEM = {
// @Param: RETRACT
// @DisplayName: Mount retract angles
// @Description: Mount angles when in retract operation mode
// @Units: Degrees
// @Range: -180 180
// @Increment: .01
// @Units: centi-Degrees
// @Range: -18000 17999
// @Increment: 1
// @User: Standard
AP_GROUPINFO("RETRACT", 1, AP_Mount, _retract_angles),
// @Param: NEUTRAL
// @DisplayName: Mount neutral angles
// @Description: Mount angles when in neutral operation mode
// @Units: Degrees
// @Range: -180 180
// @Increment: .01
// @Units: centi-Degrees
// @Range: -18000 17999
// @Increment: 1
// @User: Standard
AP_GROUPINFO("NEUTRAL", 2, AP_Mount, _neutral_angles),
// @Param: CONTROL
// @DisplayName: Mount control angles
// @Description: Mount angles when in MavLink or RC control operation mode
// @Units: Degrees
// @Range: -180 180
// @Increment: .01
// @Units: centi-Degrees
// @Range: -18000 17999
// @Increment: 1
// @User: Standard
AP_GROUPINFO("CONTROL", 3, AP_Mount, _control_angles),

View File

@ -25,10 +25,44 @@
APM_RC_Class *RC_Channel::_apm_rc;
const AP_Param::GroupInfo RC_Channel::var_info[] PROGMEM = {
// @Param: MIN
// @DisplayName: RC min PWM
// @Description: RC minimum PWM pulse width. Typically 1000 is lower limit, 1500 is neutral and 2000 is upper limit.
// @Units: ms
// @Range: 800 2200
// @Increment: 1
// @User: Advanced
AP_GROUPINFO("MIN", 0, RC_Channel, radio_min),
// @Param: TRIM
// @DisplayName: RC trim PWM
// @Description: RC trim (neutral) PWM pulse width. Typically 1000 is lower limit, 1500 is neutral and 2000 is upper limit.
// @Units: ms
// @Range: 800 2200
// @Increment: 1
// @User: Advanced
AP_GROUPINFO("TRIM", 1, RC_Channel, radio_trim),
// @Param: MAX
// @DisplayName: RC max PWM
// @Description: RC maximum PWM pulse width. Typically 1000 is lower limit, 1500 is neutral and 2000 is upper limit.
// @Units: ms
// @Range: 800 2200
// @Increment: 1
// @User: Advanced
AP_GROUPINFO("MAX", 2, RC_Channel, radio_max),
// @Param: REV
// @DisplayName: RC reverse
// @Description: Reverse servo operation. Ignored unless did switches are disabled.
// @Values: 1:Normal,-1:Reversed
// @User: Advanced
AP_GROUPINFO("REV", 3, RC_Channel, _reverse),
// @Param: DZ
// @DisplayName: RC dead-zone
// @Description: dead zone around trim.
// @User: Advanced
AP_GROUPINFO("DZ", 4, RC_Channel, _dead_zone),
AP_GROUPEND
};

View File

@ -16,18 +16,18 @@ const AP_Param::GroupInfo RC_Channel_aux::var_info[] PROGMEM = {
// @Param: ANGLE_MIN
// @DisplayName: Minimum object position
// @Description: Minimum physical angular position of the object that this servo output controls. For example a camera pan angle, an aileron angle, etc
// @Units: Degrees
// @Range: -180 180
// @Increment: .01
// @Units: centi-Degrees
// @Range: -18000 17999
// @Increment: 1
// @User: Standard
AP_GROUPINFO("ANGLE_MIN", 2, RC_Channel_aux, angle_min),
// @Param: ANGLE_MAX
// @DisplayName: Maximum object position
// @Description: Maximum physical angular position of the object that this servo output controls. For example a camera pan angle, an aileron angle, etc
// @Units: Degrees
// @Range: -180 180
// @Increment: .01
// @Units: centi-Degrees
// @Range: -18000 17999
// @Increment: 1
// @User: Standard
AP_GROUPINFO("ANGLE_MAX", 3, RC_Channel_aux, angle_max),
AP_GROUPEND
@ -131,19 +131,11 @@ RC_Channel_aux::output_ch(unsigned char ch_nr)
/// expects the changes to take effect instantly
void update_aux_servo_function(RC_Channel_aux* rc_a, RC_Channel_aux* rc_b, RC_Channel_aux* rc_c, RC_Channel_aux* rc_d)
{
// positions 0..3 of this array never get used, but this is a stack array, so the entire array gets freed at the end of the function
RC_Channel_aux::Aux_servo_function_t aux_servo_function[4];
// initialise array
aux_servo_function[0] = RC_Channel_aux::k_none;
aux_servo_function[1] = RC_Channel_aux::k_none;
aux_servo_function[2] = RC_Channel_aux::k_none;
aux_servo_function[3] = RC_Channel_aux::k_none;
if( rc_a != NULL ) { aux_servo_function[0] = (RC_Channel_aux::Aux_servo_function_t)rc_a->function.get(); }
if( rc_b != NULL ) { aux_servo_function[1] = (RC_Channel_aux::Aux_servo_function_t)rc_b->function.get(); }
if( rc_c != NULL ) { aux_servo_function[2] = (RC_Channel_aux::Aux_servo_function_t)rc_c->function.get(); }
if( rc_d != NULL ) { aux_servo_function[3] = (RC_Channel_aux::Aux_servo_function_t)rc_d->function.get(); }
aux_servo_function[0] = (rc_a == NULL)?RC_Channel_aux::k_none:(RC_Channel_aux::Aux_servo_function_t)rc_a->function.get();
aux_servo_function[1] = (rc_b == NULL)?RC_Channel_aux::k_none:(RC_Channel_aux::Aux_servo_function_t)rc_b->function.get();
aux_servo_function[2] = (rc_c == NULL)?RC_Channel_aux::k_none:(RC_Channel_aux::Aux_servo_function_t)rc_c->function.get();
aux_servo_function[3] = (rc_d == NULL)?RC_Channel_aux::k_none:(RC_Channel_aux::Aux_servo_function_t)rc_d->function.get();
for (uint8_t i = 0; i < 4; i++) {
if (aux_servo_function[i] >= RC_Channel_aux::k_nr_aux_servo_functions) {