Servo

class Servo

Represents a servo. Obtained using ServoGroup::servos(), ServoGroup::servo_with_name() or servo_with_name().

std::string name()
void set_name(std::string value)

The name of the servo.

Game Scenes:

Flight

SpaceCenter::Part part()

The part containing the servo.

Game Scenes:

Flight

void set_highlight(bool value)

Whether the servo should be highlighted in-game.

Game Scenes:

Flight

float position()

The position of the servo.

Game Scenes:

Flight

float min_config_position()

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

Game Scenes:

Flight

float max_config_position()

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

Game Scenes:

Flight

float min_position()
void set_min_position(float value)

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

Game Scenes:

Flight

float max_position()
void set_max_position(float value)

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

Game Scenes:

Flight

float config_speed()

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

Game Scenes:

Flight

float speed()
void set_speed(float value)

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

Game Scenes:

Flight

float current_speed()

The current speed at which the servo is moving.

Game Scenes:

Flight

float acceleration()
void set_acceleration(float value)

The current speed multiplier set in the UI.

Game Scenes:

Flight

bool is_moving()

Whether the servo is moving.

Game Scenes:

Flight

bool is_free_moving()

Whether the servo is freely moving.

Game Scenes:

Flight

bool is_locked()
void set_is_locked(bool value)

Whether the servo is locked.

Game Scenes:

Flight

bool is_axis_inverted()
void set_is_axis_inverted(bool value)

Whether the servos axis is inverted.

Game Scenes:

Flight

void move_right()

Moves the servo to the right.

Game Scenes:

Flight

void move_left()

Moves the servo to the left.

Game Scenes:

Flight

void move_center()

Moves the servo to the center.

Game Scenes:

Flight

void move_to(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

void stop()

Stops the servo.

Game Scenes:

Flight