|
@@ -22,6 +22,7 @@ using VehicleControlSystem;
|
|
|
using VehicleControlSystem.ControlLayer;
|
|
using VehicleControlSystem.ControlLayer;
|
|
|
using VehicleControlSystem.ControlLayer.IO;
|
|
using VehicleControlSystem.ControlLayer.IO;
|
|
|
using VehicleControlSystem.ControlLayer.MQ;
|
|
using VehicleControlSystem.ControlLayer.MQ;
|
|
|
|
|
+using VehicleControlSystem.Managers;
|
|
|
|
|
|
|
|
namespace OHV.Module.Interactivity.PopUp
|
|
namespace OHV.Module.Interactivity.PopUp
|
|
|
{
|
|
{
|
|
@@ -222,13 +223,6 @@ namespace OHV.Module.Interactivity.PopUp
|
|
|
set { SetProperty(ref this.busyText, value); }
|
|
set { SetProperty(ref this.busyText, value); }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //private bool warningEnabled;
|
|
|
|
|
- //public bool WarningEnabled
|
|
|
|
|
- //{
|
|
|
|
|
- // get { return warningEnabled; }
|
|
|
|
|
- // set { SetProperty(ref this.warningEnabled, value); }
|
|
|
|
|
- //}
|
|
|
|
|
-
|
|
|
|
|
eOcsState ocsState = eOcsState.DisConnect;
|
|
eOcsState ocsState = eOcsState.DisConnect;
|
|
|
public eOcsState OcsState
|
|
public eOcsState OcsState
|
|
|
{
|
|
{
|
|
@@ -239,6 +233,7 @@ namespace OHV.Module.Interactivity.PopUp
|
|
|
|
|
|
|
|
VCSystem vcSystem;
|
|
VCSystem vcSystem;
|
|
|
ZmqManager zmqManager;
|
|
ZmqManager zmqManager;
|
|
|
|
|
+ HostManager hostManager;
|
|
|
|
|
|
|
|
SqliteManager sql;
|
|
SqliteManager sql;
|
|
|
MessageController messageController;
|
|
MessageController messageController;
|
|
@@ -264,6 +259,8 @@ namespace OHV.Module.Interactivity.PopUp
|
|
|
this.zmqManager = system.ZmqManager;
|
|
this.zmqManager = system.ZmqManager;
|
|
|
system.ZmqManager.PropertyChanged += ZmqManager_PropertyChanged;
|
|
system.ZmqManager.PropertyChanged += ZmqManager_PropertyChanged;
|
|
|
|
|
|
|
|
|
|
+ this.hostManager = system.hostManager;
|
|
|
|
|
+
|
|
|
this.SelectPosCommand = new DelegateCommand<object>( ExecuteSelectPosCommand );
|
|
this.SelectPosCommand = new DelegateCommand<object>( ExecuteSelectPosCommand );
|
|
|
this.MoveToCommand = new DelegateCommand( ExecuteMoveToCommand );
|
|
this.MoveToCommand = new DelegateCommand( ExecuteMoveToCommand );
|
|
|
this.CurrentToTargetCommand = new DelegateCommand( ExecuteCurrentToTargetCommand );
|
|
this.CurrentToTargetCommand = new DelegateCommand( ExecuteCurrentToTargetCommand );
|
|
@@ -289,8 +286,11 @@ namespace OHV.Module.Interactivity.PopUp
|
|
|
var ezIO = this.vcSystem.IO as EzIO;
|
|
var ezIO = this.vcSystem.IO as EzIO;
|
|
|
ezIO.OnChangedIO += EzIO_OnChangedIO;
|
|
ezIO.OnChangedIO += EzIO_OnChangedIO;
|
|
|
|
|
|
|
|
- //WarningEnabled = true;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //var currentState = IsConnected;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //OHVConnector.Manager manager = new OHVConnector.Manager();
|
|
|
|
|
+ //public bool IsConnected { get { return this.manager.Connected; } }
|
|
|
|
|
|
|
|
private void ExecuteBreakOffCommand()
|
|
private void ExecuteBreakOffCommand()
|
|
|
{
|
|
{
|
|
@@ -314,6 +314,11 @@ namespace OHV.Module.Interactivity.PopUp
|
|
|
this.DriveAutoReadyState( this.zmqManager.IsCanStanbyLocation );
|
|
this.DriveAutoReadyState( this.zmqManager.IsCanStanbyLocation );
|
|
|
this.UpdateDriveState( this.zmqManager.DriveState );
|
|
this.UpdateDriveState( this.zmqManager.DriveState );
|
|
|
|
|
|
|
|
|
|
+ if(hostManager.IsConnected)
|
|
|
|
|
+ {
|
|
|
|
|
+ this.OcsState = eOcsState.Connect;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (!vcSystem.ZmqManager.SetOperationState(eOperatationMode.ManualMode))
|
|
if (!vcSystem.ZmqManager.SetOperationState(eOperatationMode.ManualMode))
|
|
|
messageController.ShowNotificationView("Drive Manual Mode Change Fail", false);
|
|
messageController.ShowNotificationView("Drive Manual Mode Change Fail", false);
|
|
|
}
|
|
}
|
|
@@ -602,11 +607,9 @@ namespace OHV.Module.Interactivity.PopUp
|
|
|
{
|
|
{
|
|
|
case HostConnectedEventArgs.eConnectedState.Connected:
|
|
case HostConnectedEventArgs.eConnectedState.Connected:
|
|
|
this.OcsState = eOcsState.Connect;
|
|
this.OcsState = eOcsState.Connect;
|
|
|
- //WarningEnabled = false;
|
|
|
|
|
break;
|
|
break;
|
|
|
case HostConnectedEventArgs.eConnectedState.Disconnected:
|
|
case HostConnectedEventArgs.eConnectedState.Disconnected:
|
|
|
this.OcsState = eOcsState.DisConnect;
|
|
this.OcsState = eOcsState.DisConnect;
|
|
|
- //WarningEnabled = true;
|
|
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -856,6 +859,7 @@ namespace OHV.Module.Interactivity.PopUp
|
|
|
{
|
|
{
|
|
|
RequestClose?.Invoke( dialogResult );
|
|
RequestClose?.Invoke( dialogResult );
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
#endregion
|
|
#endregion
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|