Skip to content

Updated RT-TUNE and TUNE-OTHER commands (v1.3)#86

Open
surfdado wants to merge 3 commits into
lukash:mainfrom
surfdado:v130_rttune_cmds
Open

Updated RT-TUNE and TUNE-OTHER commands (v1.3)#86
surfdado wants to merge 3 commits into
lukash:mainfrom
surfdado:v130_rttune_cmds

Conversation

@surfdado
Copy link
Copy Markdown
Contributor

This will allow features like negative variable tiltback as well as disable moving faults to be set via COMMAND_TUNE_OTHER. It also has some extensions to COMMAND_RT_TUNE (see individual commits)

Copy link
Copy Markdown
Owner

@lukash lukash left a comment

Choose a reason for hiding this comment

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

The PR is against main but based on testing, so it's pulling in 42 commits, can you rebase your two commits onto main?

Comment thread src/main.c Outdated
float onspd = h1;
float offspd = h2;
d->float_conf.torquetilt_on_speed = onspd / 2;
d->float_conf.torquetilt_on_speed = onspd + 3;
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.

This changes behavior of the current functionality, so it has the potential to create a mess. You have to be careful to check for the version and if anyone else is actually using this command you're breaking it for them by doing this.

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.

@surfdado I was referring to this change when talking about the potential breakage on discord. You mentioned something about the len being used to "gate" this, but I don't see it. I'm kinda fine leaving this as a dedicated FC command until there's a better way to set tunes in runtime only, just wanted to make sure there's no misunderstanding or mistake.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is correct - in Discord I suggested the "len" gating as a possible solution to address your concern, but hadn't actually implemented it yet. Since it sounds like you are okay with that approach I shall implement it shortly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, added and updated.

Comment thread src/main.c
d->switch_warn_beep_erpm = d->float_conf.is_footbeep_enabled ? 2000 : 100000;
// bits 2 & 3:
int pbmode = (flags2 >> 2) & 0x3;
d->motor_control.parking_brake_mode = pbmode;
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 don't need this line, the config is propagated to d->motor_control via reconfigure().

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.

@surfdado I think you removed this line:

d->switch_warn_beep_erpm = d->float_conf.is_footbeep_enabled ? 2000 : 100000;

Istead of:

d->motor_control.parking_brake_mode = pbmode;

The switch_warn_beep_erpm line is still needed (or you need to move the relevant assignment from configure() to reconfigure(), but feel free to just leave the line, still slated for a refactor, coming in 1.4). But the motor_control line is not.

@lukash
Copy link
Copy Markdown
Owner

lukash commented May 21, 2026

Also, the changelog trailers should be written from the point of end user, which doesn't know what the RT_TUNE and TUNE_OTHER commands are, could you rephrase the trailers to say something along the lines of "Support <option_list> to be set as a runtime tune (Float Control)"? (feel free to improve it)

@surfdado surfdado force-pushed the v130_rttune_cmds branch from aeeb5b0 to 7c58725 Compare May 21, 2026 16:10
@surfdado
Copy link
Copy Markdown
Contributor Author

Sorry I missed that, should be all fixed now, feature comments are adjusted too.

I also added a 3rd commit I had forgotten - adds speed based pushback to the TUNE_TILT command.

@surfdado surfdado force-pushed the v130_rttune_cmds branch 2 times, most recently from 6d2cc0f to 9e04bdc Compare May 22, 2026 15:19
surfdado added 3 commits May 26, 2026 13:29
It allows setting mahony kp roll and turntilt start angle.
It also allows for higher atr on/off speeds in cfg[18].
Torquetilt speeds can now also be set to higher values (up to 18).

Feature: Allow external apps to change features like mahonykp, turntilt start angle, and set faster on/off speeds
…e VarTilt

Stays Backwards compatible with older apps

Feature: Allow external apps to set DMF, SensorBeep and Parking Brake Mode, as well as negative variable tilt
Feature: Allow external apps to set speed pushback threshold on the fly
@surfdado surfdado force-pushed the v130_rttune_cmds branch from 9e04bdc to 4e0a424 Compare May 26, 2026 20:30
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