Servo#

type krpc_InfernalRobotics_Servo_t#

Represents a servo. Obtained using krpc_InfernalRobotics_ServoGroup_Servos(), krpc_InfernalRobotics_ServoGroup_ServoWithName() or krpc_InfernalRobotics_ServoWithName().

krpc_error_t krpc_InfernalRobotics_Servo_Name(krpc_connection_t connection, char **result)#
void krpc_InfernalRobotics_Servo_set_Name(const char *value)#

The name of the servo.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_UID(krpc_connection_t connection, uint32_t *result)#

The unique identifier of the servo.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_Part(krpc_connection_t connection, krpc_SpaceCenter_Part_t *result)#

The part containing the servo.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_Mode(krpc_connection_t connection, krpc_InfernalRobotics_ServoMode_t *result)#

Whether the part acts as a servo or a rotor.

Game Scenes:

Flight

void krpc_InfernalRobotics_Servo_set_Highlight(bool value)#

Whether the servo should be highlighted in-game.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_Position(krpc_connection_t connection, float *result)#

The position of the servo.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MinConfigPosition(krpc_connection_t connection, float *result)#

The minimum position of the servo, specified by the part configuration.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MaxConfigPosition(krpc_connection_t connection, float *result)#

The maximum position of the servo, specified by the part configuration.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MinPosition(krpc_connection_t connection, float *result)#
void krpc_InfernalRobotics_Servo_set_MinPosition(float value)#

The minimum position of the servo, specified by the in-game tweak menu.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MaxPosition(krpc_connection_t connection, float *result)#
void krpc_InfernalRobotics_Servo_set_MaxPosition(float value)#

The maximum position of the servo, specified by the in-game tweak menu.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_ConfigSpeed(krpc_connection_t connection, float *result)#

The speed multiplier of the servo, specified by the part configuration.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_Speed(krpc_connection_t connection, float *result)#
void krpc_InfernalRobotics_Servo_set_Speed(float value)#

The speed multiplier of the servo, specified by the in-game tweak menu.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_CurrentSpeed(krpc_connection_t connection, float *result)#

The current speed at which the servo is moving.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_Acceleration(krpc_connection_t connection, float *result)#
void krpc_InfernalRobotics_Servo_set_Acceleration(float value)#

The current speed multiplier set in the UI.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_IsMoving(krpc_connection_t connection, bool *result)#

Whether the servo is moving.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_IsFreeMoving(krpc_connection_t connection, bool *result)#

Whether the servo is freely moving.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_IsLocked(krpc_connection_t connection, bool *result)#
void krpc_InfernalRobotics_Servo_set_IsLocked(bool value)#

Whether the servo is locked.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_IsAxisInverted(krpc_connection_t connection, bool *result)#
void krpc_InfernalRobotics_Servo_set_IsAxisInverted(bool value)#

Whether the servos axis is inverted.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_TargetPosition(krpc_connection_t connection, float *result)#

The target position the servo is moving towards.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_TargetSpeed(krpc_connection_t connection, float *result)#

The target speed the servo is moving at.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_CommandedPosition(krpc_connection_t connection, float *result)#

The position the servo is currently being commanded to move to.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_DefaultPosition(krpc_connection_t connection, float *result)#

The default (built) position of the servo.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_ForceLimit(krpc_connection_t connection, float *result)#
void krpc_InfernalRobotics_Servo_set_ForceLimit(float value)#

The force limit of the servo, as a percentage of the maximum force.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MaxForce(krpc_connection_t connection, float *result)#

The maximum force the servo can generate.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MaxAcceleration(krpc_connection_t connection, float *result)#

The maximum acceleration the servo can achieve.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MaxSpeed(krpc_connection_t connection, float *result)#

The maximum speed the servo can achieve.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_ElectricChargeRequired(krpc_connection_t connection, float *result)#

The rate at which the servo consumes electric charge, in units per second, when moving.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_SpringPower(krpc_connection_t connection, float *result)#
void krpc_InfernalRobotics_Servo_set_SpringPower(float value)#

The strength of the servo’s spring, when it has one.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_DampingPower(krpc_connection_t connection, float *result)#
void krpc_InfernalRobotics_Servo_set_DampingPower(float value)#

The strength of the servo’s damping.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_RotorAcceleration(krpc_connection_t connection, float *result)#
void krpc_InfernalRobotics_Servo_set_RotorAcceleration(float value)#

The acceleration of the servo when operating as a rotor.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_IsLimited(krpc_connection_t connection, bool *result)#
void krpc_InfernalRobotics_Servo_set_IsLimited(bool value)#

Whether the servo’s range of movement is limited to the configured minimum and maximum positions.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_IsRotational(krpc_connection_t connection, bool *result)#

Whether the servo moves rotationally (as opposed to linearly).

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_IsServo(krpc_connection_t connection, bool *result)#

Whether the part is operating as a servo (rather than a rotor).

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_CanHaveLimits(krpc_connection_t connection, bool *result)#

Whether the servo can have its range of movement limited.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_HasSpring(krpc_connection_t connection, bool *result)#

Whether the servo has a spring.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_IsRunning(krpc_connection_t connection, bool *result)#

Whether the servo is running, when operating as a rotor.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_PresetPositions(krpc_connection_t connection, krpc_list_float_t *result)#

The list of preset positions configured for the servo.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MoveRight(krpc_connection_t connection)#

Moves the servo to the right.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MoveLeft(krpc_connection_t connection)#

Moves the servo to the left.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MoveCenter(krpc_connection_t connection)#

Moves the servo to the center.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_MoveTo(krpc_connection_t connection, float position, float speed)#

Moves the servo to position and sets the speed multiplier to speed.

Parameters:
  • position – The position to move the servo to.

  • speed – Speed multiplier for the movement.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_Stop(krpc_connection_t connection)#

Stops the servo.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_AddPreset(krpc_connection_t connection, float position)#

Adds a preset position to the servo.

Parameters:
  • position – The position of the preset.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_RemovePresetAt(krpc_connection_t connection, int32_t index)#

Removes the preset position at the given index.

Parameters:
  • index – The index of the preset to remove.

Game Scenes:

Flight

krpc_error_t krpc_InfernalRobotics_Servo_SortPresets(krpc_connection_t connection)#

Sorts the preset positions of the servo into ascending order.

Game Scenes:

Flight

type krpc_InfernalRobotics_ServoMode_t#

The mode a servo is operating in. See krpc_InfernalRobotics_Servo_Mode().

KRPC_INFERNALROBOTICS_SERVOMODE_SERVO#

The part acts as a servo, driving towards a target position.

KRPC_INFERNALROBOTICS_SERVOMODE_ROTOR#

The part acts as a rotor, spinning continuously.