Skip to content

Add smoothing parameters to runtime tuning - #111

Open
surfdado wants to merge 1 commit into
lukash:mainfrom
surfdado:rttune_tc
Open

surfdado wants to merge 1 commit into
lukash:mainfrom
surfdado:rttune_tc

Conversation

@surfdado

@surfdado surfdado commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Extend RT_TUNE with the Refloat 1.3 tilt smoothing time constants for ATR, torque tilt and tune tilt
Accept the extension only as a complete seven-byte group and clamp zero values to avoid division by zero.

Feature: Add setpoint smoothing parameters to runtime tuning

Extend RT_TUNE with the Refloat 1.3 tilt smoothing time constants
for ATR, torque tilt and tune tilt
Accept the extension only as a complete seven-byte group and
clamp zero values to avoid division by zero.

Feature: Add setpoint smoothing parameters to runtime tuning
Comment thread src/main.c
d->float_conf.torque_tilt.filter.on_speed_time_constant = (float) max(1, cfg[24]) / 100.0f;
d->float_conf.torque_tilt.filter.off_speed_time_constant = (float) max(1, cfg[25]) / 100.0f;
d->float_conf.turn_tilt.filter.time_constant = (float) max(1, cfg[26]) / 100.0f;
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've got a gap in the data AFAICS, is that intentional?

The previous batch inside if (len >= 19) { is reading cfg[18] as the last byte. This new batch checks if (len >= 27) {, which is 8 bytes higher, but you're only adding 7 items, you're skipping reading cfg[19] and start at cfg[20].

Looks good otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants