Skip to content

Commit

Permalink
change command name
Browse files Browse the repository at this point in the history
  • Loading branch information
avsaase committed Jan 13, 2021
1 parent 40cbcc7 commit 3117a2e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
| osd_main_voltage_decimals | 1 | Number of decimals for the battery voltages displayed in the OSD [1-2]. |
| osd_neg_alt_alarm | 5 | Value below which (negative altitude) to make the OSD relative altitude indicator blink (meters) |
| osd_pan_servo_index | | Index of the pan servo to adjust osd home heading direction based on camera pan. Note that this feature does not work with continiously rotating servos. |
| osd_pan_servo_us2centideg | 0 | Centidegrees of rotation of the pan servo per us PWM signal. A servo with 180 degrees of rotation from 1000 to 2000 us PWM typically needs `18` for this setting. Change sign to inverse direction. |
| osd_pan_servo_pwm2centideg | 0 | Centidegrees of pan servo rotation us PWM signal. A servo with 180 degrees of rotation from 1000 to 2000 us PWM typically needs `18` for this setting. Change sign to inverse direction. |
| osd_plus_code_digits | 10 | Numer of plus code digits before shortening with `osd_plus_code_short`. Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm. |
| osd_plus_code_short | 0 | Number of leading digits removed from plus code. Removing 2, 4 and 6 digits requires a reference location within, respectively, ~800km, ~40 km and ~2km to recover the original coordinates. |
| osd_right_sidebar_scroll | | |
Expand Down
6 changes: 3 additions & 3 deletions src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3021,9 +3021,9 @@ groups:
min: 0
max: 10

- name: osd_pan_servo_us2centideg
description: Centidegrees of rotation of the pan servo per us PWM signal. A servo with 180 degrees of rotation from 1000 to 2000 us PWM typically needs `18` for this setting. Change sign to inverse direction.
field: pan_servo_us2centideg
- name: osd_pan_servo_pwm2centideg
description: Centidegrees of pan servo rotation us PWM signal. A servo with 180 degrees of rotation from 1000 to 2000 us PWM typically needs `18` for this setting. Change sign to inverse direction.
field: pan_servo_pwm2centideg
default_value: 0
min: -36
max: 36
Expand Down
6 changes: 3 additions & 3 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ int16_t osdPanServoHomeDirectionOffset(void)
int8_t servoIndex = osdConfig()->pan_servo_index;
int16_t servoPosition = servo[servoIndex];
int16_t servoMiddle = servoParams(servoIndex)->middle;
return (int16_t)CENTIDEGREES_TO_DEGREES((servoPosition - servoMiddle) * osdConfig()->pan_servo_us2centideg);
return (int16_t)CENTIDEGREES_TO_DEGREES((servoPosition - servoMiddle) * osdConfig()->pan_servo_pwm2centideg);
}

// Returns a heading angle in degrees normalized to [0, 360).
Expand Down Expand Up @@ -1347,7 +1347,7 @@ static bool osdDrawSingleElement(uint8_t item)
else
{
int16_t panHomeDirOffset = 0;
if (!(osdConfig()->pan_servo_us2centideg == 0)){
if (!(osdConfig()->pan_servo_pwm2centideg == 0)){
panHomeDirOffset = osdPanServoHomeDirectionOffset();
}
int homeDirection = GPS_directionToHome - DECIDEGREES_TO_DEGREES(osdGetHeading()) + panHomeDirOffset;
Expand Down Expand Up @@ -2605,7 +2605,7 @@ PG_RESET_TEMPLATE(osdConfig_t, osdConfig,
.sidebar_scroll_arrows = 0,
.osd_home_position_arm_screen = true,
.pan_servo_index = 0,
.pan_servo_us2centideg = 0,
.pan_servo_pwm2centideg = 0,

.units = OSD_UNIT_METRIC,
.main_voltage_decimals = 1,
Expand Down
2 changes: 1 addition & 1 deletion src/main/io/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ typedef struct osdConfig_s {
uint8_t right_sidebar_scroll_step; // Same as left_sidebar_scroll_step, but for the right sidebar.
bool osd_home_position_arm_screen;
uint8_t pan_servo_index; // Index of the pan servo used for home direction offset
int8_t pan_servo_us2centideg; // centidegrees per us pwm
int8_t pan_servo_pwm2centideg; // Centidegrees of servo rotation per us pwm
uint8_t crsf_lq_format;

} osdConfig_t;
Expand Down

0 comments on commit 3117a2e

Please sign in to comment.