|
|
|
|
@ -8,23 +8,23 @@ namespace RobotLib |
|
|
|
|
{ |
|
|
|
|
public class Robot |
|
|
|
|
{ |
|
|
|
|
public Robot(IPublisherSubscriber com, RobotTypes type) |
|
|
|
|
public Robot(IPublisherSubscriber com, RobotMode type) |
|
|
|
|
{ |
|
|
|
|
Com = com; |
|
|
|
|
Type = type; |
|
|
|
|
if(type == RobotTypes.Undefined) |
|
|
|
|
if(type == RobotMode.Undefined) |
|
|
|
|
{ |
|
|
|
|
throw new System.ArgumentException("Undefined robot type, must define type!"); |
|
|
|
|
throw new System.ArgumentException("Undefined robot mode, must define mode!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(type == RobotTypes.Mobile) |
|
|
|
|
if(type == RobotMode.Mobile) |
|
|
|
|
{ |
|
|
|
|
//Buzzer = new DevBuzzer(Com); |
|
|
|
|
Battery = new DevBattery(Com); |
|
|
|
|
LineSensor = new DevLineSensor(com); |
|
|
|
|
Movement = new DevMovement(com); |
|
|
|
|
} |
|
|
|
|
else if(type == RobotTypes.Stationary) |
|
|
|
|
else if(type == RobotMode.Stationary) |
|
|
|
|
{ |
|
|
|
|
SplitFlap = new DevSplitFlap(com); |
|
|
|
|
} |
|
|
|
|
@ -38,7 +38,7 @@ namespace RobotLib |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public IPublisherSubscriber Com { get; } |
|
|
|
|
public RobotTypes Type { get; } |
|
|
|
|
public RobotMode Type { get; } |
|
|
|
|
|
|
|
|
|
//public DevBuzzer Buzzer { get; } |
|
|
|
|
public DevBattery Battery { get; } |
|
|
|
|
|