|
|
@@ -35,9 +35,8 @@ namespace HBLConsole.MORKIC |
|
|
|
GVL_MORIC mORKD = new GVL_MORIC(); |
|
|
|
//咖啡机主控程序 |
|
|
|
private CoffeeMachine coffeeMachine; |
|
|
|
//单片机主控程序 |
|
|
|
private ICChipMachine icchipMachine; |
|
|
|
//冰淇淋主控程序 |
|
|
|
private IceCreamMachine iceCreamMachine; |
|
|
|
//物料存放位置 |
|
|
|
private Dictionary<string, PolymerBatching> batchings = new Dictionary<string, PolymerBatching>(); |
|
|
|
//容器位置 |
|
|
@@ -98,8 +97,7 @@ namespace HBLConsole.MORKIC |
|
|
|
} |
|
|
|
//咖啡机创建 |
|
|
|
coffeeMachine = new CoffeeMachine(com_Coffee, (BaudRates)Enum.Parse(typeof(BaudRates), baud_Coffee)); |
|
|
|
//冰淇淋机创建 |
|
|
|
iceCreamMachine = new IceCreamMachine(com_IceCream, (BaudRates)Enum.Parse(typeof(BaudRates), baud_IceCream)); |
|
|
|
//单片机机创建 |
|
|
|
icchipMachine = new ICChipMachine(com_ICChip, (BaudRates)Enum.Parse(typeof(BaudRates), baud_ICChip)); |
|
|
|
|
|
|
|
Main(); |
|
|
@@ -171,23 +169,17 @@ namespace HBLConsole.MORKIC |
|
|
|
{ |
|
|
|
//咖啡机开启主线程 |
|
|
|
coffeeMachine.Start(); |
|
|
|
//冰淇淋机开启主线程 |
|
|
|
iceCreamMachine.Start(); |
|
|
|
//单片机开启主线程 |
|
|
|
icchipMachine.Start(); |
|
|
|
new ModeSetEvent() { Mode = MORKI_MODE.制冷模式 }.Publish(); |
|
|
|
|
|
|
|
//开始心跳刷新,根据咖啡机及冰淇淋机来判断 |
|
|
|
ThreadManage.GetInstance.StartLong(new Action(() => |
|
|
|
{ |
|
|
|
|
|
|
|
//GeneralConfig.Healthy = true; |
|
|
|
//GeneralConfig.Healthy = |
|
|
|
// LebaiHelper.GetInstance.IsConnected && |
|
|
|
// MorkIStatus.GetInstance().CanDo && |
|
|
|
// MorkCStatus.GetInstance().CanDo; |
|
|
|
GeneralConfig.Healthy = |
|
|
|
LebaiHelper.GetInstance.IsConnected && |
|
|
|
MorkCStatus.GetInstance().CanDo; |
|
|
|
MorkCStatus.GetInstance().CanDo && |
|
|
|
ChipStatus.GetInstance().CanDo; |
|
|
|
//GeneralConfig.Healthy = true; |
|
|
|
Thread.Sleep(100); |
|
|
|
}), "MORK-IC心跳刷新"); |
|
|
|