Genhis / KRPC.MechJeb

kRPC service for MechJeb2 (Kerbal Space Program)
https://genhis.github.io/KRPC.MechJeb/
GNU General Public License v3.0
15 stars 8 forks source link

Attempting to set SmartASS surface vel only sets yaw #15

Closed TheTimgor closed 3 years ago

TheTimgor commented 3 years ago

Setting surface retrograde/prograde values with Smart ASS only updates yaw values in game

Code snippet to reproduce

import krpc

conn = krpc.connect(name="plz work")
smart_ass = conn.mech_jeb.smart_ass

smart_ass.autopilot_mode = smart_ass.autopilot_mode.surface_retrograde  # or prograde
smart_ass.surface_vel_yaw = 45
smart_ass.force_roll = True
smart_ass.surface_vel_roll = 45
smart_ass.surface_vel_pitch = 45
smart_ass.update(False)

print(smart_ass.surface_vel_yaw, smart_ass.surface_vel_roll, smart_ass.surface_vel_pitch)

Expected behavior Autopilot switches to surface retrograde mode with roll, pitch, and yaw set to 45 degrees.

Actual behavior Only yaw is set. The print statement outputs 45.0 45.0 45.0 so the values are changed (nothing is resetting them), so presumably they're just not being sent to mechjeb.

Version details If it's important, the game has Realism Overhaul installed and I'm on Ubuntu 19.10

kRPC.MechJeb: v0.5.1

Kerbal Space Program: 1.8.1 kRPC: 0.4.8 MechJeb2: 2.9.2.0

Genhis commented 3 years ago

Thank you for reporting the issue. Currently, surface_vel_roll and surface_vel_pitch behave the same as surface_roll and surface_pitch (but they shouldn't). I will release a fix tomorrow.