public IEnumerable <RotorInfo> TableToRotorInfoTransform(Table table) { var rotorDefinitions = new RotorInfo[3]; foreach (TableRow row in table.Rows) { var rotorInfo = new RotorInfo(row["Type"], row["Starting Position"][0], row["Ring Setting"][0]); if (row["Position"] == "Left") { rotorDefinitions[0] = rotorInfo; } else if (row["Position"] == "Middle") { rotorDefinitions[1] = rotorInfo; } else { rotorDefinitions[2] = rotorInfo; } } return(rotorDefinitions); }
public RotorSocket SetupRotor(RotorInfo rotorInfo) { return(SetupRotor(Rotor.Create(rotorInfo.Type, rotorInfo.RingSettingOffset), rotorInfo.StartingOffset)); }
public virtual bool SetRotorSpeed(int rotorIndex, RotorInfo rotorInfo) { throw new NotImplementedException("This is supposed to be implemented in Drone sub class"); }
// Sets the animation for rotors on the drone. This is being done by AirLib through Pinvoke calls public override bool SetRotorSpeed(int rotorIndex, RotorInfo rotorInfo) { rotorInfos[rotorIndex] = rotorInfo; return(true); }
private static bool SetRotorSpeed(int rotorIndex, RotorInfo rotorInfo, string vehicleName) { var vehicle = Vehicles.Find(element => element.vehicleName == vehicleName); return(vehicle.VehicleInterface.SetRotorSpeed(rotorIndex, rotorInfo)); }
public void SetupRotor(RotorInfo rotorInfo) { SetupRotor(Rotor.Create(rotorInfo.Type, rotorInfo.RingSettingOffset), rotorInfo.StartingOffset); }