Skip to content

SmartASS: smooth control starts from the vessel's attitude, and stops commanding once at its target or while another autopilot steers - #2819

Merged
sarbian merged 1 commit into
devfrom
fix/smartass-smooth
Nov 29, 2026
Merged

sarbian merged 1 commit into
devfrom
fix/smartass-smooth

Conversation

@sarbian

@sarbian sarbian commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Part of #2472 (audit epic, CTRL): HCTRL-a3, HCTRL-a4 (Medium).

Summary

1 commit, 1 file changed. The end of the smooth turn is a flag set where the last step copies the target.

SmartASS: smooth control starts from the vessel's attitude, and stops commanding once at its target or while another autopilot steers

Smooth control only exists for the SURF angle targets, but Engage read the flag before it was cleared for the other targets. Clicking HVEL- or UP with Smooth control ticked started the transition from the frame's forward instead of the vessel's direction, commanded that, and the flag was cleared right after, so the vessel held HVEL+ or north on the horizon. Smooth control is now active only for the surface angle targets and the setting is kept while another target is selected, and a smooth transition to a direction starts from the vessel's pointing.

While smooth control was on, SmartASS called AttitudeTo and reset the axis control every tick, even after the transition had ended. With "Disable SmartASS automatically" off, SmartASS stays a user beside another autopilot, so the node executor or the landing autopilot had its target overwritten by SmartASS's every tick, its roll freed and, at each flip of more than 10 degrees, its axes and PIDs reset. SmartASS now commands only while the transition runs, and does nothing while another module steers.

Not changed: unticking Smooth control during a transition still leaves the commanded attitude where the transition was until the next Execute, as on dev.

Tested

Measured on an earlier, longer version of this change, not re-run on this one (rebased on dev 6959f7c; Debug build with no new warnings, MechJebLibTest passes).

MechJeb2_UI Spike 81 (PC, development player, MechJeb -c Debug, KSP 1.12.5, 3.2x system, KSPCommunityFixes; Kerbal X MJ Test from MJTesting), dev b85bdac against test/opus-medium, Poodle stage in orbit: SmartASS SURF with Smooth, then HVEL-.

commanded attitude vessel Smooth afterwards
dev 180.0° from HVEL- (HVEL+) 179.8° from HVEL- cleared
earlier version 0.0° from HVEL- 0.3° from HVEL- kept

Not tested in game: HCTRL-a4 (SmartASS against another autopilot with auto-disable off).

… commanding once at its target or while another autopilot steers

Smooth control only exists for the SURF angle targets, but Engage read the flag before it was cleared for the other targets. Clicking HVEL- or UP with Smooth control ticked started the transition from the frame's forward instead of the vessel's direction, commanded that, and the flag was cleared right after, so the vessel held HVEL+ or north on the horizon. Smooth control is now active only for the surface angle targets and the setting is kept while another target is selected, and a smooth transition to a direction starts from the vessel's pointing.

While smooth control was on, SmartASS called AttitudeTo and reset the axis control every tick, even after the transition had ended. With "Disable SmartASS automatically" off, SmartASS stays a user beside another autopilot, so the node executor or the landing autopilot had its target overwritten by SmartASS's every tick, its roll freed and, at each flip of more than 10 degrees, its axes and PIDs reset. SmartASS now commands only while the transition runs, and does nothing while another module steers.
@github-actions

Copy link
Copy Markdown
Contributor

✅ Build Artifact 🚀

MechJeb2-c3834bd.zip (built from c0cc9e8)

@sarbian
sarbian merged commit 5d04d30 into dev Nov 29, 2026
3 checks passed
@sarbian
sarbian deleted the fix/smartass-smooth branch November 29, 2026 20:33
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.

1 participant