|
|
@@ -186,87 +186,89 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
}
|
|
|
|
|
|
public bool IsMoving { get; set; }
|
|
|
+ #region Battery Property
|
|
|
|
|
|
double batteryVoltage;
|
|
|
- public double BatteryVoltage
|
|
|
- {
|
|
|
- get { return this.batteryVoltage; }
|
|
|
- set { this.SetField( ref this.batteryVoltage , value );}
|
|
|
+ public double BatteryVoltage
|
|
|
+ {
|
|
|
+ get { return this.batteryVoltage; }
|
|
|
+ set { this.SetField( ref this.batteryVoltage , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryCurrent;
|
|
|
- public double BatteryCurrent
|
|
|
- {
|
|
|
- get { return this.batteryCurrent; }
|
|
|
- set{this.SetField(ref this.batteryCurrent, value); }
|
|
|
+ public double BatteryCurrent
|
|
|
+ {
|
|
|
+ get { return this.batteryCurrent; }
|
|
|
+ set { this.SetField( ref this.batteryCurrent , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryState;
|
|
|
- public double BatteryState
|
|
|
- {
|
|
|
- get { return this.batteryState; }
|
|
|
- set { this.SetField( ref this.batteryState , value); }
|
|
|
+ public double BatteryState
|
|
|
+ {
|
|
|
+ get { return this.batteryState; }
|
|
|
+ set { this.SetField( ref this.batteryState , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryChargeTime;
|
|
|
- public double BatteryChargeTime
|
|
|
- {
|
|
|
- get { return this.batteryChargeTime; }
|
|
|
- set { this.SetField( ref this.batteryChargeTime , value ); }
|
|
|
+ public double BatteryChargeTime
|
|
|
+ {
|
|
|
+ get { return this.batteryChargeTime; }
|
|
|
+ set { this.SetField( ref this.batteryChargeTime , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryDisChargeTime;
|
|
|
- public double BatteryDisChargeTime
|
|
|
- {
|
|
|
- get { return this.batteryDisChargeTime; }
|
|
|
- set { this.SetField( ref this.batteryDisChargeTime , value ); }
|
|
|
+ public double BatteryDisChargeTime
|
|
|
+ {
|
|
|
+ get { return this.batteryDisChargeTime; }
|
|
|
+ set { this.SetField( ref this.batteryDisChargeTime , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryStateOfCharge;
|
|
|
- public double BatteryStateOfCharge
|
|
|
- {
|
|
|
- get { return this.batteryStateOfCharge; }
|
|
|
- set { this.SetField( ref this.batteryStateOfCharge , value ); }
|
|
|
+ public double BatteryStateOfCharge
|
|
|
+ {
|
|
|
+ get { return this.batteryStateOfCharge; }
|
|
|
+ set { this.SetField( ref this.batteryStateOfCharge , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryStateOfHealth;
|
|
|
- public double BatteryStateOfHealth
|
|
|
- {
|
|
|
- get { return this.batteryStateOfHealth; }
|
|
|
- set { this.SetField( ref this.batteryStateOfHealth , value ); }
|
|
|
+ public double BatteryStateOfHealth
|
|
|
+ {
|
|
|
+ get { return this.batteryStateOfHealth; }
|
|
|
+ set { this.SetField( ref this.batteryStateOfHealth , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryCapacity;
|
|
|
- public double BatteryCapacity
|
|
|
- {
|
|
|
- get { return this.batteryCapacity; }
|
|
|
- set { this.SetField( ref this.batteryCapacity , value ); }
|
|
|
+ public double BatteryCapacity
|
|
|
+ {
|
|
|
+ get { return this.batteryCapacity; }
|
|
|
+ set { this.SetField( ref this.batteryCapacity , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryEnergy;
|
|
|
- public double BatteryEnergy
|
|
|
- {
|
|
|
- get { return this.batteryEnergy; }
|
|
|
- set { this.SetField( ref this.batteryEnergy , value ); }
|
|
|
+ public double BatteryEnergy
|
|
|
+ {
|
|
|
+ get { return this.batteryEnergy; }
|
|
|
+ set { this.SetField( ref this.batteryEnergy , value ); }
|
|
|
}
|
|
|
|
|
|
double batteryTemperature;
|
|
|
- public double BatteryTemperature
|
|
|
- {
|
|
|
- get { return this.batteryTemperature; }
|
|
|
- set { this.SetField( ref this.batteryTemperature , value ); }
|
|
|
+ public double BatteryTemperature
|
|
|
+ {
|
|
|
+ get { return this.batteryTemperature; }
|
|
|
+ set { this.SetField( ref this.batteryTemperature , value ); }
|
|
|
}
|
|
|
|
|
|
bool batteryIsConnect;
|
|
|
- public bool BatteryIsConnect
|
|
|
- {
|
|
|
- get
|
|
|
+ public bool BatteryIsConnect
|
|
|
+ {
|
|
|
+ get
|
|
|
{
|
|
|
this.BatteryIsConnect = this.bMUManager.IsConnected;
|
|
|
- return this.bMUManager.IsConnected;
|
|
|
+ return this.bMUManager.IsConnected;
|
|
|
}
|
|
|
set { this.SetField( ref this.batteryIsConnect , value ); }
|
|
|
- }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
public bool IsError { get; set; }
|
|
|
|
|
|
public SubCmd CurrentSubCommand { get; private set; }
|
|
|
@@ -457,7 +459,7 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
case DriveControlEventArgs.eControlKind.NONE:
|
|
|
break;
|
|
|
case DriveControlEventArgs.eControlKind.Conveyor:
|
|
|
- this.ReqConveyor( _args );
|
|
|
+ //this.ReqConveyor( _args );
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
@@ -465,13 +467,13 @@ namespace VehicleControlSystem.ControlLayer
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void ReqConveyor( DriveControlEventArgs args )
|
|
|
+ public void ReqConveyorMove( string dir )
|
|
|
{
|
|
|
- if ( args.CvDir == DriveControlEventArgs.eCvDir.CW ) //Load
|
|
|
+ if ( dir.Equals("CW") )
|
|
|
this.OnOffConveyor( true, false );
|
|
|
- else if ( args.CvDir == DriveControlEventArgs.eCvDir.CCW ) //Unload
|
|
|
+ else if ( dir.Equals("CCW"))
|
|
|
this.OnOffConveyor( true, true );
|
|
|
- else if ( args.CvDir == DriveControlEventArgs.eCvDir.STOP )
|
|
|
+ else if ( dir.Equals("STOP") )
|
|
|
this.OnOffConveyor( false, false );
|
|
|
}
|
|
|
|