Hello Coders!
Getting the current angle of a rotors is something that has been somewhat of a problem for me. Because of this i set out to create a simple piece of code that could get said angle.
Below you will find some code that gets the current angle of the rotor.
Get current angle of rotor
Getting the current angle of a rotors is something that has been somewhat of a problem for me. Because of this i set out to create a simple piece of code that could get said angle.
Below you will find some code that gets the current angle of the rotor.
Code:
void Main() { var rotorStator = GridTerminalSystem.GetBlockWithName("Rotor") as IMyMotorStator; string info = rotorStator.DetailedInfo; string CAngString = System.Text.RegularExpressions.Regex.Replace(info,...