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

Fixed ValueError when setting enum properties #4

Closed vkribo closed 5 years ago

vkribo commented 5 years ago

In setter of an enum property there must be a cast of value to int.

Code: conn = krpc.connect() mj = conn.mech_jeb smart_ass = mj.smart_ass smart_ass.autopilot_mode = mj.SmartASSAutopilotMode.surface

Assigning to the autopilot_mode property was causing ValueError. The same thing happens with other enum properties.