Skip to content

Commit

Permalink
Merge branch 'master' into esc_sensor_hw5_pr
Browse files Browse the repository at this point in the history
* master:
  Add ESC Forward programming for YGE and Scorpion ESCs (rotorflight#108)
  Improve yaw precomp filtering
  Fix Governor Passthrough IDLE state throttle tracking
  Use servo pulse limits for output throttle
  Change gov_max_throttle range to 0..100%
  Fix CMS label alignment on small screen (rotorflight#109)
  Add CMS Rescue, PID controller and bandwidth menus (rotorflight#107)
  Fix hover drift in PID mode 3
  Fix for CMS feature disabled issue on Spektrum telemetry (rotorflight#106)
  Update CMS flight profile menus (rotorflight#104)
  Auto detection fix for Kontronik ESCs (rotorflight#100)

# Conflicts:
#	src/main/sensors/esc_sensor.c
  • Loading branch information
bob01 committed May 13, 2024
2 parents d9cf2eb + be50b72 commit b9c693a
Show file tree
Hide file tree
Showing 9 changed files with 535 additions and 80 deletions.
8 changes: 4 additions & 4 deletions src/main/cli/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,9 @@ const clivalue_t valueTable[] = {
#endif

// PG_MOTOR_CONFIG
{ "min_throttle", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { PWM_PULSE_MIN, PWM_PULSE_MAX }, PG_MOTOR_CONFIG, offsetof(motorConfig_t, minthrottle) },
{ "max_throttle", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { PWM_PULSE_MIN, PWM_PULSE_MAX }, PG_MOTOR_CONFIG, offsetof(motorConfig_t, maxthrottle) },
{ "min_command", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { PWM_PULSE_MIN, PWM_PULSE_MAX }, PG_MOTOR_CONFIG, offsetof(motorConfig_t, mincommand) },
{ "min_throttle", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { PWM_SERVO_PULSE_MIN, PWM_SERVO_PULSE_MAX }, PG_MOTOR_CONFIG, offsetof(motorConfig_t, minthrottle) },
{ "max_throttle", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { PWM_SERVO_PULSE_MIN, PWM_SERVO_PULSE_MAX }, PG_MOTOR_CONFIG, offsetof(motorConfig_t, maxthrottle) },
{ "min_command", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { PWM_SERVO_PULSE_MIN, PWM_SERVO_PULSE_MAX }, PG_MOTOR_CONFIG, offsetof(motorConfig_t, mincommand) },
#ifdef USE_DSHOT
#ifdef USE_DSHOT_DMAR
{ "dshot_burst", VAR_UINT8 | HARDWARE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON_AUTO }, PG_MOTOR_CONFIG, offsetof(motorConfig_t, dev.useBurstDshot) },
Expand Down Expand Up @@ -1159,7 +1159,7 @@ const clivalue_t valueTable[] = {
{ "gov_yaw_ff_weight", VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 250 }, PG_PID_PROFILE, offsetof(pidProfile_t, governor.yaw_ff_weight) },
{ "gov_cyclic_ff_weight", VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 250 }, PG_PID_PROFILE, offsetof(pidProfile_t, governor.cyclic_ff_weight) },
{ "gov_collective_ff_weight", VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 250 }, PG_PID_PROFILE, offsetof(pidProfile_t, governor.collective_ff_weight) },
{ "gov_max_throttle", VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 40, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, governor.max_throttle) },
{ "gov_max_throttle", VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, governor.max_throttle) },

// PG_TELEMETRY_CONFIG
#ifdef USE_TELEMETRY
Expand Down
13 changes: 12 additions & 1 deletion src/main/cms/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,18 @@ static int cmsDrawMenuEntry(displayPort_t *pDisplay, const OSD_Entry *p, uint8_t
case OME_Label:
if (IS_PRINTVALUE(*flags) && p->data) {
// A label with optional string, immediately following text
cnt = cmsDisplayWrite(pDisplay, leftMenuColumn + 1 + (uint8_t)strlen(p->text), row, DISPLAYPORT_ATTR_NONE, p->data);
uint8_t start_column = leftMenuColumn;
if (smallScreen) {
#ifdef CMS_OSD_RIGHT_ALIGNED_VALUES
if ((uint8_t)strlen(p->data) <= rightMenuColumn) {
start_column = rightMenuColumn - (uint8_t)strlen(p->data);
}
#endif
}
else {
start_column += (uint8_t)strlen(p->text) +1;
}
cnt = cmsDisplayWrite(pDisplay, start_column, row, DISPLAYPORT_ATTR_NONE, p->data);
CLR_PRINTVALUE(*flags);
}
break;
Expand Down
Loading

0 comments on commit b9c693a

Please sign in to comment.