Plane.Sdk3/PlaneGcsSdk_UWP/Communication/CopterFactory.cs

20 lines
527 B
C#
Raw Permalink Normal View History

2017-02-27 02:02:19 +08:00
using Plane.Communication;
using Plane.Copters;
namespace Plane.CopterManagement
{
public partial class CopterFactory : ICopterFactory
{
public ICopter CreateBluetoothCopter(string hostName, string name = "GHOSTDRONE")
{
var connection = new BluetoothConnection(hostName);
var copter = new PLCopter(connection, _uiSyncContext)
{
Id = "Bluetooth_" + hostName,
Name = name
};
return copter;
}
}
}