Servo#

class Servo#

Represents a servo. Obtained using ServoGroup.Servos, ServoGroup.ServoWithName or InfernalRobotics.ServoWithName.

String Name { get; set; }#

The name of the servo.

Game Scenes:

Flight

UInt32 UID { get; }#

The unique identifier of the servo.

Game Scenes:

Flight

SpaceCenter.Part Part { get; }#

The part containing the servo.

Game Scenes:

Flight

ServoMode Mode { get; }#

Whether the part acts as a servo or a rotor.

Game Scenes:

Flight

Boolean Highlight { set; }#

Whether the servo should be highlighted in-game.

Game Scenes:

Flight

Single Position { get; }#

The position of the servo.

Game Scenes:

Flight

Single MinConfigPosition { get; }#

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

Game Scenes:

Flight

Single MaxConfigPosition { get; }#

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

Game Scenes:

Flight

Single MinPosition { get; set; }#

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

Game Scenes:

Flight

Single MaxPosition { get; set; }#

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

Game Scenes:

Flight

Single ConfigSpeed { get; }#

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

Game Scenes:

Flight

Single Speed { get; set; }#

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

Game Scenes:

Flight

Single CurrentSpeed { get; }#

The current speed at which the servo is moving.

Game Scenes:

Flight

Single Acceleration { get; set; }#

The current speed multiplier set in the UI.

Game Scenes:

Flight

Boolean IsMoving { get; }#

Whether the servo is moving.

Game Scenes:

Flight

Boolean IsFreeMoving { get; }#

Whether the servo is freely moving.

Game Scenes:

Flight

Boolean IsLocked { get; set; }#

Whether the servo is locked.

Game Scenes:

Flight

Boolean IsAxisInverted { get; set; }#

Whether the servos axis is inverted.

Game Scenes:

Flight

Single TargetPosition { get; }#

The target position the servo is moving towards.

Game Scenes:

Flight

Single TargetSpeed { get; }#

The target speed the servo is moving at.

Game Scenes:

Flight

Single CommandedPosition { get; }#

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

Game Scenes:

Flight

Single DefaultPosition { get; }#

The default (built) position of the servo.

Game Scenes:

Flight

Single ForceLimit { get; set; }#

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

Game Scenes:

Flight

Single MaxForce { get; }#

The maximum force the servo can generate.

Game Scenes:

Flight

Single MaxAcceleration { get; }#

The maximum acceleration the servo can achieve.

Game Scenes:

Flight

Single MaxSpeed { get; }#

The maximum speed the servo can achieve.

Game Scenes:

Flight

Single ElectricChargeRequired { get; }#

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

Game Scenes:

Flight

Single SpringPower { get; set; }#

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

Game Scenes:

Flight

Single DampingPower { get; set; }#

The strength of the servo’s damping.

Game Scenes:

Flight

Single RotorAcceleration { get; set; }#

The acceleration of the servo when operating as a rotor.

Game Scenes:

Flight

Boolean IsLimited { get; set; }#

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

Game Scenes:

Flight

Boolean IsRotational { get; }#

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

Game Scenes:

Flight

Boolean IsServo { get; }#

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

Game Scenes:

Flight

Boolean CanHaveLimits { get; }#

Whether the servo can have its range of movement limited.

Game Scenes:

Flight

Boolean HasSpring { get; }#

Whether the servo has a spring.

Game Scenes:

Flight

Boolean IsRunning { get; }#

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

Game Scenes:

Flight

IList<Single> PresetPositions { get; }#

The list of preset positions configured for the servo.

Game Scenes:

Flight

void MoveRight ()#

Moves the servo to the right.

Game Scenes:

Flight

void MoveLeft ()#

Moves the servo to the left.

Game Scenes:

Flight

void MoveCenter ()#

Moves the servo to the center.

Game Scenes:

Flight

void MoveTo (Single position, Single 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

void Stop ()#

Stops the servo.

Game Scenes:

Flight

void AddPreset (Single position)#

Adds a preset position to the servo.

Parameters:
  • position – The position of the preset.

Game Scenes:

Flight

void RemovePresetAt (Int32 index)#

Removes the preset position at the given index.

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

Game Scenes:

Flight

void SortPresets ()#

Sorts the preset positions of the servo into ascending order.

Game Scenes:

Flight

enum ServoMode#

The mode a servo is operating in. See Servo.Mode.

Servo#

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

Rotor#

The part acts as a rotor, spinning continuously.