1751 lines
67 KiB
C++
1751 lines
67 KiB
C++
#include "XTPurifier.h"
|
|
#include "../Toast.h"
|
|
#include "../external/imgui/imgui_custom.h"
|
|
#include "../SystemInfo.h"
|
|
#include "../LanguageManager.h"
|
|
#include "../Logger.h"
|
|
#include "../global.h"
|
|
#include "../plc/SignalService.h"
|
|
|
|
XTPurifier::XTPurifier(ScannerCtrl* scannerCtrl)
|
|
: m_ScannerCtrl(scannerCtrl)
|
|
, m_Client(NULL)
|
|
, m_PreConnectState(false)
|
|
, m_ManualCheckAirTightness(false)
|
|
{
|
|
m_ConnectAlarmTick = GetTickCount64();
|
|
m_LastKeepAlive = 0;
|
|
m_ConnectAlarmCountTick = 0;
|
|
}
|
|
|
|
|
|
XTPurifier::~XTPurifier()
|
|
{
|
|
if(m_Client)delete m_Client;
|
|
}
|
|
|
|
void XTPurifier::Init()
|
|
{
|
|
map<string, CommunicationCfg*>* cfg = ConfigManager::GetInstance()->GetCommunicationCfg();
|
|
m_RunCfg = ConfigManager::GetInstance()->GetRunCfg();
|
|
|
|
m_IOCfgWrapper = ConfigManager::GetInstance()->GetIoCfgWrapper();
|
|
m_MachineCfg = ConfigManager::GetInstance()->GetMachineCfg();
|
|
m_AlarmCfgWrapper = ConfigManager::GetInstance()->GetAlarmCfg();
|
|
m_Client = new PurifierClient((*cfg)["XT_PURIFIER"]);
|
|
m_Client->Init();
|
|
ConfigManager::GetInstance()->AddComRefCfg(m_Client->GetConfig(), m_Client);
|
|
m_Client->GetConfig()->m_Enable = true;
|
|
if(m_Client->GetConfig()->m_Enable)m_Client->Startup();
|
|
}
|
|
|
|
void XTPurifier::AutoCtrlWhenDoorOpen()
|
|
{
|
|
if (m_State.isDedusting) {
|
|
m_Client->SetDedust(false);
|
|
int waitcount = 0;
|
|
Purifierstat_XT xt;
|
|
while (waitcount < 60) {
|
|
Sleep(50);
|
|
m_Client->GetStat(xt);
|
|
if (!xt.isDedusting) {
|
|
break;
|
|
}
|
|
waitcount++;
|
|
}
|
|
}
|
|
|
|
if(m_State.isPurifying) {
|
|
m_Client->SetPurify(false);
|
|
int waitcount = 0;
|
|
Purifierstat_XT xt;
|
|
while (waitcount < 60) {
|
|
Sleep(50);
|
|
m_Client->GetStat(xt);
|
|
if (!xt.isPurifying) {
|
|
break;
|
|
}
|
|
waitcount++;
|
|
}
|
|
g_Toast->AddToast(new ToastBean(_(u8"关闭除氧:舱门打开").c_str(),3000,Toast::COLOR_ORANGE));
|
|
}
|
|
//if (m_IOCfgWrapper->m_PrintAirSupply) {
|
|
// if (m_IOCfgWrapper->m_PrintAirSupply->IsActive()) {
|
|
// m_IOCfgWrapper->m_PrintAirSupply->SetActive(false);
|
|
// }
|
|
//}
|
|
}
|
|
|
|
void XTPurifier::AutoCtrlWhenPrint()
|
|
{
|
|
|
|
}
|
|
|
|
void XTPurifier::AutoCtrlWhenStanby()
|
|
{
|
|
if (m_State.isPurifying)
|
|
{
|
|
// EnterCriticalSection(&g_SystemInfo->m_InfoCs);
|
|
bool isLowerTarge = (g_SystemInfo->m_ComPrintOxygen1 < m_RunCfg->m_TargeOxygen && g_SystemInfo->m_ComPrintOxygen2 < m_RunCfg->m_TargeOxygen);
|
|
// LeaveCriticalSection(&g_SystemInfo->m_InfoCs);
|
|
if (isLowerTarge && (m_State.filterOxygenValue <= m_State.filterCleanOxygenSetValue)) {
|
|
m_Client->SetPurify(false);
|
|
int waitcount = 0;
|
|
while (waitcount < 60) {
|
|
Sleep(50);
|
|
UpdateShowStat();
|
|
if (!m_State.isPurifying) {
|
|
g_Toast->AddToast(new ToastBean(_(u8"停止除氧").c_str(), 3000));
|
|
break;
|
|
}
|
|
waitcount++;
|
|
}
|
|
|
|
m_Client->SetDedust(true);
|
|
waitcount = 0;
|
|
while (waitcount < 60) {
|
|
Sleep(50);
|
|
UpdateShowStat();
|
|
if (m_State.isDedusting) {
|
|
g_Toast->AddToast(new ToastBean(_(u8"开启除尘").c_str(), 3000));
|
|
break;
|
|
}
|
|
waitcount++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
void XTPurifier::HandlePrintFinish()
|
|
{
|
|
|
|
}
|
|
|
|
void XTPurifier::HandlePrintStop()
|
|
{
|
|
if (m_State.isPurifying) {
|
|
m_Client->SetPurify(false);
|
|
}
|
|
if (m_State.isDedusting) {
|
|
m_Client->SetDedust(false);
|
|
}
|
|
int count = 0;
|
|
while (m_State.isPurifying && count < 20) {
|
|
count++;
|
|
Sleep(200);
|
|
UpdateShowStat();
|
|
}
|
|
count = 0;
|
|
while (m_State.isDedusting && count < 20) {
|
|
count++;
|
|
Sleep(200);
|
|
UpdateShowStat();
|
|
}
|
|
}
|
|
|
|
void XTPurifier::StartAutoDeoxygen()
|
|
{
|
|
|
|
m_IsDeoxygenStarted = true;
|
|
m_LastStartDeoxygenTime = GetTickCount64();
|
|
m_HadCalcDeoxygenTime = false;
|
|
m_LastDeoxygenTime = 0.0f;
|
|
g_Toast->AddToast(new ToastBean(_(u8"开启除氧").c_str(), 3000));
|
|
// EnterCriticalSection(&g_SystemInfo->m_InfoCs);
|
|
bool isUpperTarge = ((g_SystemInfo->m_ComPrintOxygen1 > m_State.printCleanOxygenSetValue) || (g_SystemInfo->m_ComPrintOxygen2 > m_State.printCleanOxygenSetValue)|| (m_State.filterOxygenValue > m_State.filterCleanOxygenSetValue));
|
|
// LeaveCriticalSection(&g_SystemInfo->m_InfoCs);
|
|
|
|
if (isUpperTarge) {
|
|
if (!m_State.isPurifying) {
|
|
m_Client->SetPurify(true);
|
|
g_log->TraceInfo(_(u8"开启除氧").c_str());
|
|
}
|
|
}
|
|
else {
|
|
if (!m_State.isDedusting) {
|
|
m_Client->SetDedust(true);
|
|
g_log->TraceInfo(_(u8"开启除尘").c_str());
|
|
}
|
|
}
|
|
//if (m_IOCfgWrapper->m_PrintAirSupply) {
|
|
// if (!m_IOCfgWrapper->m_PrintAirSupply->IsActive()) {
|
|
// m_IOCfgWrapper->m_PrintAirSupply->SetActive(true);
|
|
// }
|
|
//}
|
|
}
|
|
|
|
void XTPurifier::StopAutoDeoxygen()
|
|
{
|
|
m_IsDeoxygenStarted = false;
|
|
g_Toast->AddToast(new ToastBean(_(u8"停止除氧").c_str(), 3000));
|
|
if (m_State.isPurifying) {
|
|
m_Client->SetPurify(false);
|
|
if (!m_HadCalcDeoxygenTime) {
|
|
m_LastDeoxygenTime = (GetTickCount64() - m_LastStartDeoxygenTime) /1000.0f/ 60.0f;
|
|
m_HadCalcDeoxygenTime = true;
|
|
}
|
|
g_log->TraceInfo(_(u8"停止除氧").c_str());
|
|
}
|
|
if (m_State.isDedusting) {
|
|
m_Client->SetDedust(false);
|
|
g_log->TraceInfo(_(u8"停止除尘").c_str());
|
|
}
|
|
}
|
|
|
|
bool XTPurifier::IsAutoDeoxygen()
|
|
{
|
|
if (m_State.isPurifying || m_State.isDedusting) return true;
|
|
else return false;
|
|
}
|
|
|
|
bool XTPurifier::HandleReadyPrint(bool startAfterPause, unsigned int& deoxytime)
|
|
{
|
|
//DWORD startTick = GetTickCount64();
|
|
//if (m_IOCfgWrapper->m_PrintAirSupply) {
|
|
// if (!m_IOCfgWrapper->m_PrintAirSupply->IsActive()) {
|
|
// m_IOCfgWrapper->m_PrintAirSupply->SetActive(true);
|
|
// }
|
|
//}
|
|
|
|
if (m_State.isBlowBack) {
|
|
g_Toast->AddToast(new ToastBean(_(u8"终止:检测到正在反吹"), 5000, Toast::COLOR_RED));
|
|
return false;
|
|
}
|
|
|
|
float judgeOxygen = m_RunCfg->m_TargeOxygen;
|
|
if (startAfterPause) {
|
|
judgeOxygen = m_RunCfg->m_WarnOxygen;
|
|
}
|
|
//g_Toast->AddToast(new ToastBean(_(u8"开启除氧").c_str(), 3000));
|
|
EnterCriticalSection(&g_SystemInfo->m_InfoCs);
|
|
bool isUpperTarge = (g_SystemInfo->m_ComPrintOxygen1 > judgeOxygen) || (g_SystemInfo->m_ComPrintOxygen2 > judgeOxygen) || (m_State.filterOxygenValue > m_State.filterCleanOxygenSetValue);
|
|
LeaveCriticalSection(&g_SystemInfo->m_InfoCs);
|
|
SignalState ss;
|
|
SignalService::GetInstance().GetSignalState(ss);
|
|
bool cylinderNeedDeoxygen = (!ss.m_MoldDeoxygenFinished && ss.m_MoldDeoxygenEnable && m_RunCfg->m_MoldDeoxygenEnable);
|
|
if (isUpperTarge || cylinderNeedDeoxygen) {
|
|
if (m_State.isDedusting) {
|
|
m_Client->SetDedust(false);
|
|
Sleep(2000);
|
|
}
|
|
UpdateShowStat();
|
|
if (!m_State.isPurifying) {
|
|
if(isUpperTarge)g_Toast->AddToast(new ToastBean(_(u8"开启打印室除氧"), 3000, ImVec4(0, 1, 0, 1)));
|
|
|
|
m_Client->SetPurify(true);
|
|
|
|
m_IsDeoxygenStarted = true;
|
|
m_LastStartDeoxygenTime = GetTickCount64();
|
|
m_HadCalcDeoxygenTime = false;
|
|
Sleep(3000);
|
|
}
|
|
if (cylinderNeedDeoxygen)
|
|
{
|
|
SignalService::GetInstance().StartCylinderDeoxygen();
|
|
g_Toast->AddToast(new ToastBean(_(u8"开启缸体除氧"), 3000, ImVec4(0, 1, 0, 1)));
|
|
Sleep(2000);
|
|
}
|
|
}
|
|
|
|
UpdateShowStat();
|
|
BaseCtrl::SetPreState(BaseCtrl::Purifying);
|
|
SignalService::GetInstance().GetSignalState(ss);
|
|
int dcount = 0;
|
|
while ((BaseCtrl::GetPreState() == ScannerCtrl::Purifying && m_State.isPurifying) || ss.m_MoldDeoxygenRun)
|
|
{
|
|
if (!BaseCtrl::IsPrePrint()) {
|
|
break;
|
|
}
|
|
judgeOxygen = m_RunCfg->m_TargeOxygen;
|
|
if (startAfterPause) {
|
|
judgeOxygen = m_RunCfg->m_WarnOxygen;
|
|
}
|
|
Sleep(500);
|
|
EnterCriticalSection(&g_SystemInfo->m_InfoCs);
|
|
bool isLowerTarge = ((g_SystemInfo->m_ComPrintOxygen1 <= judgeOxygen) && (g_SystemInfo->m_ComPrintOxygen2 <= judgeOxygen) && (m_State.filterOxygenValue <= m_State.filterCleanOxygenSetValue));
|
|
LeaveCriticalSection(&g_SystemInfo->m_InfoCs);
|
|
SignalService::GetInstance().GetSignalState(ss);
|
|
if (isLowerTarge) {
|
|
if (cylinderNeedDeoxygen) {
|
|
if (ss.m_MoldDeoxygenRun && !ss.m_MoldDeoxygenFinished) {
|
|
if ((dcount % 20) == 0) {
|
|
dcount = 0;
|
|
g_Toast->AddToast(new ToastBean(_(u8"等待缸体除氧完成"), 3000, Toast::COLOR_ORANGE));
|
|
}
|
|
}
|
|
else {
|
|
break;
|
|
}
|
|
}
|
|
else break;
|
|
}
|
|
else {
|
|
if ((dcount % 20) == 0) {
|
|
dcount = 0;
|
|
g_Toast->AddToast(new ToastBean(_(u8"等待打印室和净化器除氧完成"), 3000, Toast::COLOR_ORANGE));
|
|
}
|
|
}
|
|
dcount++;
|
|
}
|
|
Sleep(500);
|
|
if (!BaseCtrl::IsPrePrint()) {
|
|
return false;
|
|
}
|
|
|
|
if (m_State.isPurifying) {
|
|
m_Client->SetPurify(false);
|
|
Sleep(2000);
|
|
}
|
|
|
|
//DWORD stoptick = GetTickCount64();
|
|
//deoxytime = (stoptick - startTick) / 1000;
|
|
if (m_IsDeoxygenStarted && !m_HadCalcDeoxygenTime) {
|
|
m_LastDeoxygenTime = (GetTickCount64() - m_LastStartDeoxygenTime) / 1000.0f / 60.0f;
|
|
m_HadCalcDeoxygenTime = true;
|
|
}
|
|
deoxytime = m_LastDeoxygenTime * 60;
|
|
|
|
if (!m_State.isDedusting) {
|
|
m_Client->SetDedust(true);
|
|
g_Toast->AddToast(new ToastBean(_(u8"开启除尘").c_str(), 3000, ImVec4(0, 1, 0, 1)));
|
|
Sleep(3000);
|
|
}
|
|
UpdateShowStat();
|
|
BaseCtrl::SetPreState(BaseCtrl::Dedusting);
|
|
int count = 0;
|
|
while (BaseCtrl::IsPrePrint() && BaseCtrl::GetPreState() == ScannerCtrl::Dedusting) {
|
|
Sleep(500);
|
|
|
|
UpdateShowStat();
|
|
if (!m_State.isDedusting) {
|
|
if ((g_SystemInfo->GetComPrintOxygen1() < m_RunCfg->m_AlarmOxygen) && (g_SystemInfo->GetComPrintOxygen2() < m_RunCfg->m_AlarmOxygen))
|
|
{
|
|
if (m_State.isPurifying) {
|
|
m_Client->SetPurify(false);
|
|
Sleep(1000);
|
|
}
|
|
m_Client->SetDedust(true);
|
|
Sleep(1000);
|
|
}
|
|
else {
|
|
if ((count % 20) == 0) {
|
|
if (!m_State.isPurifying)
|
|
{
|
|
m_Client->SetPurify(true);
|
|
Sleep(1000);
|
|
}
|
|
count = 0;
|
|
g_Toast->AddToast(new ToastBean(_(u8"正在等待循环重启"), 3000, Toast::COLOR_ORANGE));
|
|
}
|
|
count++;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
FanFit* al = m_ExtCfg->m_FanWindFit[m_ExtCfg->m_SelectedFanWindFit];
|
|
if ((m_State.windSetValue - m_State.windActualValue) > al->checkWindOffset) {
|
|
if ((count % 20) == 0) {
|
|
count = 0;
|
|
g_Toast->AddToast(new ToastBean(_(u8"正在等待风速").c_str(), 3000, Toast::COLOR_ORANGE));
|
|
}
|
|
count++;
|
|
continue;
|
|
}
|
|
|
|
|
|
judgeOxygen = m_RunCfg->m_WarnOxygen;
|
|
|
|
if ((g_SystemInfo->m_ComPrintOxygen1 > judgeOxygen) || (g_SystemInfo->m_ComPrintOxygen2 > judgeOxygen)) {
|
|
if ((count % 20) == 0) {
|
|
count = 0;
|
|
g_Toast->AddToast(new ToastBean(_(u8"正在等待氧含量").c_str(), 3000, Toast::COLOR_ORANGE));
|
|
}
|
|
count++;
|
|
continue;
|
|
}
|
|
|
|
if (m_AlarmCfgWrapper->m_InverterRunSignalAlarm&&m_AlarmCfgWrapper->m_InverterRunSignalAlarm->m_IsEnable)
|
|
{
|
|
if (m_AlarmCfgWrapper->m_InverterRunSignalAlarm->m_IsAlarm) {
|
|
if ((count % 20) == 0) {
|
|
count = 0;
|
|
g_Toast->AddToast(new ToastBean(_(u8"正在变频器运行信号"), 3000, Toast::COLOR_ORANGE));
|
|
}
|
|
count++;
|
|
continue;
|
|
}
|
|
}
|
|
if (m_AlarmCfgWrapper->m_PrintSignalAlarm&&m_AlarmCfgWrapper->m_PrintSignalAlarm->m_IsEnable)
|
|
{
|
|
if (m_AlarmCfgWrapper->m_PrintSignalAlarm->m_IsAlarm) {
|
|
if ((count % 20) == 0) {
|
|
count = 0;
|
|
g_Toast->AddToast(new ToastBean(_(u8"正在等待可打印信号"), 3000, Toast::COLOR_ORANGE));
|
|
}
|
|
count++;
|
|
continue;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
if (!BaseCtrl::IsPrePrint()) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
void XTPurifier::UpdateShowStat()
|
|
{
|
|
m_Client->GetStat(m_State);
|
|
}
|
|
|
|
|
|
void XTPurifier::AutoCtrl()
|
|
{
|
|
if (m_IsDeoxygenStarted && !m_State.isPurifying)
|
|
{
|
|
m_IsDeoxygenStarted = false;
|
|
if (!m_HadCalcDeoxygenTime) {
|
|
m_LastDeoxygenTime = (GetTickCount64() - m_LastStartDeoxygenTime) /1000.0f/ 60.0f;
|
|
m_HadCalcDeoxygenTime = true;
|
|
}
|
|
}
|
|
if (!BaseCtrl::IsStandBy() || m_State.isPurifying || m_State.isDedusting)
|
|
{
|
|
if (m_State.isBlowBack) {
|
|
g_Toast->AddToast(new ToastBean(_(u8"存在不允许反吹条件,反吹中断"), 3000, Toast::COLOR_RED));
|
|
m_Client->SetBlowBack(false);
|
|
Sleep(500);
|
|
}
|
|
}
|
|
|
|
/*if (((g_SystemInfo->m_ComPrintOxygen1 > m_RunCfg->m_AlarmOxygen) || (g_SystemInfo->m_ComPrintOxygen2 > m_RunCfg->m_AlarmOxygen)) && !m_RunCfg->m_IsDebugMode) {
|
|
if (m_State.isDedusting) {
|
|
g_Toast->AddToast(new ToastBean(u8"氧含量越限,循环关闭", 3000, Toast::COLOR_RED));
|
|
m_Client->SetDedust(false);
|
|
Sleep(1000);
|
|
UpdateShowStat();
|
|
}
|
|
}*/
|
|
|
|
if (!m_ManualCheckAirTightness) {
|
|
if (m_State.isPurifying || m_State.isDedusting) {
|
|
if (m_IOCfgWrapper->m_PurifierCoolerPower) {
|
|
m_IOCfgWrapper->m_PurifierCoolerPower->SetActive(true);
|
|
}
|
|
if (m_IOCfgWrapper->m_PrintAssistGas && !m_IOCfgWrapper->m_PrintAssistGas->IsActive()) {
|
|
m_IOCfgWrapper->m_PrintAssistGas->SetActive(true);
|
|
}
|
|
|
|
}
|
|
else {
|
|
if (m_IOCfgWrapper->m_PurifierCoolerPower) {
|
|
m_IOCfgWrapper->m_PurifierCoolerPower->SetActive(false);
|
|
}
|
|
if (m_IOCfgWrapper->m_PrintAssistGas && m_IOCfgWrapper->m_PrintAssistGas->IsActive()) {
|
|
m_IOCfgWrapper->m_PrintAssistGas->SetActive(false);
|
|
}
|
|
}
|
|
m_IOCfgWrapper->m_PrintAirEvacuation->SetActive(m_State.isPurifying);
|
|
}
|
|
|
|
bool isDedustingStopAlarm = !m_State.isDedusting;
|
|
|
|
if (isDedustingStopAlarm) {
|
|
uint64_t tnow = GetTickCount64();
|
|
if (tnow - m_DudestingAlarmTick > 1500) {
|
|
g_SystemInfo->SetDedustingStopAlarm(true);
|
|
}
|
|
}
|
|
else {
|
|
m_DudestingAlarmTick = GetTickCount64();
|
|
g_SystemInfo->SetDedustingStopAlarm(false);
|
|
}
|
|
|
|
if (m_AlarmCfgWrapper->m_PurifierKeepAliveAlarm)
|
|
{
|
|
int tick = m_RunCfg->m_PurifierKeepAliveAlarmJudgeSecond * 1000 / m_CycleTick;
|
|
if (m_State.keepAlive == m_LastKeepAlive) {
|
|
m_AlarmCfgWrapper->m_PurifierKeepAliveAlarm->m_AlarmContinueTick++;
|
|
if (m_AlarmCfgWrapper->m_PurifierKeepAliveAlarm->m_AlarmContinueTick > tick) {
|
|
m_AlarmCfgWrapper->m_PurifierKeepAliveAlarm->m_AlarmContinueTick = tick+1;
|
|
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_PurifierKeepAliveAlarm,true);
|
|
}
|
|
}
|
|
else {
|
|
m_AlarmCfgWrapper->m_PurifierKeepAliveAlarm->m_AlarmContinueTick = 0;
|
|
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_PurifierKeepAliveAlarm, false);
|
|
}
|
|
m_LastKeepAlive = m_State.keepAlive;
|
|
}
|
|
|
|
if (m_AlarmCfgWrapper->m_WindOverLimitAlarm && m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag > 600) {
|
|
float alarmPercent = m_ExtCfg->m_FanWindFit[m_ExtCfg->m_SelectedFanWindFit]->checkAlarmPercent;
|
|
float minAlarm = m_State.windSetValue * (1.0f - alarmPercent / 100.0f);
|
|
float maxAlarm = m_State.windSetValue * (1.0f + alarmPercent / 100.0f);
|
|
float actV = m_State.windActualValue;
|
|
if ((actV > maxAlarm || actV < minAlarm)) {
|
|
m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_AlarmInfo = to_string(actV);
|
|
m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_IsAlarm = true;
|
|
}
|
|
else
|
|
{
|
|
m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_AlarmInfo = "";
|
|
m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_IsAlarm = false;
|
|
}
|
|
}
|
|
|
|
m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag++;
|
|
if (m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag > 700)m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag = 700;
|
|
|
|
CheckInternalAlarm();
|
|
//关闭补气阀
|
|
|
|
SignalState ss;
|
|
SignalService::GetInstance().GetSignalState(ss);
|
|
if (m_RunCfg->m_PrintAutoRenewalGas) {
|
|
if (BaseCtrl::IsStart()|| BaseCtrl::IsPause()) {
|
|
if (m_Client->IsComConnected())
|
|
{
|
|
if (ss.m_PrintAirRenewalEnable)
|
|
{
|
|
if (!m_State.shieldMonitorPrintPressure) {
|
|
m_Client->SetShieldMonitorPrintPressure(true);
|
|
}
|
|
if (!ss.m_PrintAirRenewalTrigger) {
|
|
SignalService::GetInstance().SetPrintAirRenewalTrigger(true);
|
|
}
|
|
}
|
|
else {
|
|
if (m_State.shieldMonitorPrintPressure) {
|
|
m_Client->SetShieldMonitorPrintPressure(false);
|
|
}
|
|
if (ss.m_PrintAirRenewalTrigger) {
|
|
SignalService::GetInstance().SetPrintAirRenewalTrigger(false);
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (m_State.shieldMonitorPrintPressure) {
|
|
m_Client->SetShieldMonitorPrintPressure(false);
|
|
}
|
|
if (ss.m_PrintAirRenewalTrigger) {
|
|
SignalService::GetInstance().SetPrintAirRenewalTrigger(false);
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (m_State.shieldMonitorPrintPressure) {
|
|
m_Client->SetShieldMonitorPrintPressure(false);
|
|
}
|
|
if (ss.m_PrintAirRenewalTrigger) {
|
|
SignalService::GetInstance().SetPrintAirRenewalTrigger(false);
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
if (m_State.shieldMonitorPrintPressure) {
|
|
m_Client->SetShieldMonitorPrintPressure(false);
|
|
}
|
|
if (ss.m_PrintAirRenewalTrigger) {
|
|
SignalService::GetInstance().SetPrintAirRenewalTrigger(false);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
void XTPurifier::CheckInternalAlarm()
|
|
{
|
|
if (!m_AlarmCfgWrapper->m_PurifierInternalAlarm)return;
|
|
bool hasAlarm = false;
|
|
stringstream ss;
|
|
|
|
if (m_State.midTempOverLimitAlarm)
|
|
{
|
|
ss << _(u8"中效高温报警").c_str() << "\n";
|
|
hasAlarm = true;
|
|
}
|
|
|
|
if (m_State.midHighTempOverLimitAlarm)
|
|
{
|
|
ss << _(u8"中效超高温报警").c_str() << "\n";
|
|
hasAlarm = true;
|
|
}
|
|
|
|
if (m_State.highPressureLackValveAlarm)
|
|
{
|
|
ss << _(u8"高压气气压不足").c_str() << "\n";
|
|
hasAlarm = true;
|
|
}
|
|
|
|
if (m_State.inverterPowerBreak)
|
|
{
|
|
ss << _(u8"变频器电源断开").c_str() << "\n";
|
|
hasAlarm = true;
|
|
}
|
|
|
|
if (m_State.inverterAlarm)
|
|
{
|
|
ss << _(u8"变频器报警").c_str() << "\n";
|
|
hasAlarm = true;
|
|
}
|
|
|
|
if (m_State.cycleInValveOpenAlarm)
|
|
{
|
|
ss << _(u8"循环进气阀打开异常").c_str() << "\n";
|
|
hasAlarm = true;
|
|
}
|
|
|
|
if (m_State.cycleOutValueOpenAlarm)
|
|
{
|
|
ss << _(u8"循环出气阀打开异常").c_str() << "\n";
|
|
hasAlarm = true;
|
|
}
|
|
|
|
if (m_State.cycleOutValueOpenAlarm)
|
|
{
|
|
ss << _(u8"循环出气阀打开异常").c_str() << "\n";
|
|
hasAlarm = true;
|
|
}
|
|
|
|
if (hasAlarm)
|
|
{
|
|
m_AlarmCfgWrapper->m_PurifierInternalAlarm->m_AlarmInfo = ss.str().c_str();
|
|
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_PurifierInternalAlarm, true);
|
|
}
|
|
else {
|
|
m_AlarmCfgWrapper->m_PurifierInternalAlarm->m_AlarmInfo = "";
|
|
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_PurifierInternalAlarm, false);
|
|
}
|
|
}
|
|
|
|
//void XTPurifier::DrawUI()
|
|
//{
|
|
// if (g_Admin > USER) {
|
|
// DrawAdminUI();
|
|
// }
|
|
// else DrawUserUI();
|
|
//}
|
|
|
|
//void XTPurifier::DrawAdminUI()
|
|
//{
|
|
// Purifierstat_XT purifierstatXT;
|
|
// m_Client->GetStat(purifierstatXT);
|
|
//
|
|
// ImGui::Begin(_(u8"净化器").c_str(), &m_PurifierWinShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_HorizontalScrollbar);
|
|
// //ImGui::SetWindowFontScale(1.2);
|
|
// float inputWidth = 80.0f;
|
|
// ImGui::BeginGroup();
|
|
// ImGui::Text(_(u8"净化器端口连接:").c_str()); ImGui::SameLine();
|
|
// if (m_Client->IsServerConnected())ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"正常").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"断开").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"净化器通讯连接:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.baseStat.isConnected)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"正常").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"断开").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"类型:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%d", purifierstatXT.purifierType);
|
|
// ImGui::Text(_(u8"中效压力值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.midPressureValue);
|
|
//
|
|
// ImGui::Text(_(u8"中效压差值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.midPressureDifValue);
|
|
//
|
|
// ImGui::Text(_(u8"高效压差值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.highPressureDifValue);
|
|
//
|
|
// ImGui::Text(_(u8"中效温度:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f ℃", purifierstatXT.midTemperatureValue);
|
|
//
|
|
// ImGui::Text(_(u8"中效压差报警设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("midPressureDifAlarmValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.midPressureDifAlarmValue = purifierstatXT.midPressureDifAlarmValue;
|
|
// if (ImGui::InputFloatEx("kpa", &m_PurifierShowBean.midPressureDifAlarmValue, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetMidPressureDifAlarmValue(m_PurifierShowBean.midPressureDifAlarmValue);
|
|
// g_log->TraceInfo(_(u8"更改中校压差报警值为:%.2f kpa").c_str(), m_PurifierShowBean.midPressureDifAlarmValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"高效压差报警设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("highPressureDifAlarmValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.highPressureDifAlarmValue = purifierstatXT.highPressureDifAlarmValue;
|
|
// if (ImGui::InputFloatEx("kpa", &m_PurifierShowBean.highPressureDifAlarmValue, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetHighPressureDifAlarmValue(m_PurifierShowBean.highPressureDifAlarmValue);
|
|
// g_log->TraceInfo(_(u8"更改高效压差报警设值:%.2f").c_str(), m_PurifierShowBean.highPressureDifAlarmValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"箱体压力上限:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("boxPressureUpLimit");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.boxPressureUpLimit = purifierstatXT.boxPressureUpLimit;
|
|
// if (ImGui::InputFloatEx("kpa", &m_PurifierShowBean.boxPressureUpLimit, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetBoxPressureUpLimit(m_PurifierShowBean.boxPressureUpLimit);
|
|
// g_log->TraceInfo(_(u8"更改箱体压力上限:%.2f").c_str(), m_PurifierShowBean.boxPressureUpLimit);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"箱体压力下限:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("boxPressureDownLimit");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.boxPressureDownLimit = purifierstatXT.boxPressureDownLimit;
|
|
// if (ImGui::InputFloatEx("kpa", &m_PurifierShowBean.boxPressureDownLimit, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetBoxPressureDownLimit(m_PurifierShowBean.boxPressureDownLimit);
|
|
// g_log->TraceInfo(_(u8"更改箱体压力下限:%.2f").c_str(), m_PurifierShowBean.boxPressureDownLimit);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
//
|
|
// ImGui::Text(_(u8"中效高温报警设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("midTempHighSetValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.midTempHighSetValue = purifierstatXT.midTempHighSetValue;
|
|
// if (ImGui::InputFloatEx(u8"℃", &m_PurifierShowBean.midTempHighSetValue, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetMidTempHighSetValue(m_PurifierShowBean.midTempHighSetValue);
|
|
// g_log->TraceInfo(_(u8"更改中效高温报警设值:%.2f").c_str(), m_PurifierShowBean.midTempHighSetValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"中效超高温报警设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("midTempUltraSetValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.midTempUltraSetValue = purifierstatXT.midTempUltraSetValue;
|
|
// if (ImGui::InputFloatEx(u8"℃", &m_PurifierShowBean.midTempUltraSetValue, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetMidTempUltraSetValue(m_PurifierShowBean.midTempUltraSetValue);
|
|
// g_log->TraceInfo(_(u8"更改中效超高温报警设值:%.2f").c_str(), m_PurifierShowBean.midTempUltraSetValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
//
|
|
//
|
|
// ImGui::Text(_(u8"风机频率过低报警值:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("fanFreqLowAlarm");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// if (ImGui::InputFloatEx("Hz", &m_RunCfg->m_FanFreqLowLimit, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue))
|
|
// {
|
|
// //g_log->TraceInfo(_(u8"更新风机频率报警值:%.2f").c_str(), m_RunCfg->m_FanFreqAlarmValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
//
|
|
// if (g_Admin > USER_ADMIN) {
|
|
// m_PurifierShowBean.isCoverWind = purifierstatXT.isCoverWind;
|
|
// if (ImGui::Checkbox(_(u8"铺粉风速控制").c_str(), &m_PurifierShowBean.isCoverWind))
|
|
// {
|
|
// m_Client->SetCoverWind(m_PurifierShowBean.isCoverWind);
|
|
// }
|
|
// }
|
|
// else {
|
|
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
|
// ImGui::Checkbox(_(u8"铺粉风速控制").c_str(), &purifierstatXT.isCoverWind);
|
|
// ImGui::PopItemFlag();
|
|
// }
|
|
// ImGui::Checkbox(_(u8"使用铺粉风速信号").c_str(), &m_RunCfg->m_UseCoverWindSignal);
|
|
// if (g_Admin > USER_ADMIN) {
|
|
// m_PurifierShowBean.coverWindSlowFinish = purifierstatXT.coverWindSlowFinish;
|
|
// if (ImGui::Checkbox(_(u8"铺粉风速完成信号").c_str(), &m_PurifierShowBean.coverWindSlowFinish))
|
|
// {
|
|
// m_Client->SetWindSlowFinishSignal(m_PurifierShowBean.coverWindSlowFinish);
|
|
// }
|
|
// m_PurifierShowBean.coverWindResumeFinish = purifierstatXT.coverWindResumeFinish;
|
|
// if (ImGui::Checkbox(_(u8"铺粉风速恢复信号").c_str(), &m_PurifierShowBean.coverWindResumeFinish))
|
|
// {
|
|
// m_Client->SetWindResumeFinishSignal(m_PurifierShowBean.coverWindResumeFinish);
|
|
// }
|
|
// }
|
|
// else {
|
|
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
|
// ImGui::Checkbox(_(u8"铺粉风速完成信号").c_str(), &purifierstatXT.coverWindSlowFinish);
|
|
// ImGui::PopItemFlag();
|
|
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
|
// ImGui::Checkbox(_(u8"铺粉风速恢复信号").c_str(), &purifierstatXT.coverWindResumeFinish);
|
|
// ImGui::PopItemFlag();
|
|
// }
|
|
//
|
|
// ImGui::Text(_(u8"铺粉风速比率:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("coverWindSpeedOffset");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.coverWindSpeedOffset = purifierstatXT.coverWindSpeedOffset * 100.0f;
|
|
// if (ImGui::InputFloatEx(u8"%", &m_PurifierShowBean.coverWindSpeedOffset, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetCoverWindOffset(m_PurifierShowBean.coverWindSpeedOffset / 100.0f);
|
|
// g_log->TraceInfo(_(u8"更改铺粉变风速比率:%.2f").c_str(), m_PurifierShowBean.coverWindSpeedOffset);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
//
|
|
// ImGui::Checkbox(_(u8"打印换气").c_str(), &m_RunCfg->m_PrintAutoRenewalGas);
|
|
// if (g_Admin > USER_ADMIN) {
|
|
// m_PurifierShowBean.shieldMonitorPrintPressure = purifierstatXT.shieldMonitorPrintPressure;
|
|
// if (ImGui::Checkbox(_(u8"屏蔽监测压力").c_str(), &m_PurifierShowBean.shieldMonitorPrintPressure))
|
|
// {
|
|
// m_Client->SetShieldMonitorPrintPressure(m_PurifierShowBean.shieldMonitorPrintPressure);
|
|
// }
|
|
// }
|
|
// else {
|
|
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
|
// ImGui::Checkbox(_(u8"屏蔽监测压力").c_str(), &purifierstatXT.shieldMonitorPrintPressure);
|
|
// ImGui::PopItemFlag();
|
|
// }
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 20);
|
|
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
|
// ImGui::SameLine();
|
|
//
|
|
// ImGui::BeginGroup();
|
|
// ImGui::Text(_(u8"风速计实际值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f", purifierstatXT.anemometerActualValue);
|
|
//
|
|
// ImGui::Text(_(u8"循环风速:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f M³/H", purifierstatXT.windActualValue);
|
|
//
|
|
// ImGui::Text(_(u8"风机频率:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f Hz", purifierstatXT.fanFreq);
|
|
//
|
|
// ImGui::Text(_(u8"除尘系统氧含量:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f %%", purifierstatXT.filterOxygenValue);
|
|
//
|
|
// ImGui::Text(_(u8"打印室氧含量:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f PPM", purifierstatXT.printOxygenValue);
|
|
//
|
|
// ImGui::Text(_(u8"滤芯使用总时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u h", purifierstatXT.filterTotalUseTime);
|
|
//
|
|
// ImGui::SameLine();
|
|
// ImGui::PushID("resetFilterTime");
|
|
// if (ImGui::Button(_(u8"重置").c_str())) {
|
|
// m_Client->ResetFilterTime();
|
|
// g_log->TraceInfo(_(u8"虑芯使用时间清零").c_str());
|
|
// }
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"反吹总次数:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u", purifierstatXT.bowBackTimes);
|
|
//
|
|
// ImGui::Text(_(u8"上次反吹后已使用时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u h", purifierstatXT.usedTimeFromlastBowBack);
|
|
//
|
|
// ImGui::Text(_(u8"箱体本次清洗时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u min", purifierstatXT.boxWashTime);
|
|
//
|
|
// ImGui::Text(_(u8"除尘系统本次清洗时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u min", purifierstatXT.filterWashTime);
|
|
//
|
|
//
|
|
// ImGui::Text(_(u8"风速设定:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("windSetValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.windSetValue = purifierstatXT.windSetValue;
|
|
// if (ImGui::InputFloatEx(u8"M³/H", &m_PurifierShowBean.windSetValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// if (m_PurifierShowBean.windSetValue <= 0.0f)m_PurifierShowBean.windSetValue = 1.0f;
|
|
// if (m_PurifierShowBean.windSetValue > purifierstatXT.maxWindSetValue)m_PurifierShowBean.windSetValue = purifierstatXT.maxWindSetValue;
|
|
// m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag = 0;
|
|
// m_Client->SetWindValue(m_PurifierShowBean.windSetValue);
|
|
// g_log->TraceInfo(_(u8"更改风速设定:%.2f").c_str(), m_PurifierShowBean.windSetValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"最大风速设定:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("maxWindSetValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.maxWindSetValue = purifierstatXT.maxWindSetValue;
|
|
// if (ImGui::InputFloatEx(u8"M³/H", &m_PurifierShowBean.maxWindSetValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// if (m_PurifierShowBean.maxWindSetValue <= purifierstatXT.windSetValue)m_PurifierShowBean.maxWindSetValue = purifierstatXT.windSetValue;
|
|
// m_Client->SetMaxWindValue(m_PurifierShowBean.maxWindSetValue);
|
|
// g_log->TraceInfo(_(u8"更改最大风速设定:%.2f").c_str(), m_PurifierShowBean.maxWindSetValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"滤芯清洗氧含量设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("filterCleanOxygenSetValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.filterCleanOxygenSetValue = purifierstatXT.filterCleanOxygenSetValue;
|
|
// if (ImGui::InputFloatEx("%", &m_PurifierShowBean.filterCleanOxygenSetValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// if (m_PurifierShowBean.filterCleanOxygenSetValue < 0)m_PurifierShowBean.filterCleanOxygenSetValue = 0;
|
|
// m_Client->SetfilterCleanOxygenSetValue(m_PurifierShowBean.filterCleanOxygenSetValue);
|
|
// g_log->TraceInfo(_(u8"更改虑芯清洗氧含量设值:%.2f").c_str(), m_PurifierShowBean.filterCleanOxygenSetValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"滤芯氧含量报警值:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("filterCleanOxygenAlarmValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// //m_PurifierShowBean.filterCleanOxygenSetValue = purifierstatXT.filterCleanOxygenSetValue;
|
|
// if (ImGui::InputFloatEx("%", &m_RunCfg->m_FilterOxygenAlarmValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// if (m_RunCfg->m_FilterOxygenAlarmValue < purifierstatXT.filterCleanOxygenSetValue)m_RunCfg->m_FilterOxygenAlarmValue = purifierstatXT.filterCleanOxygenSetValue + 0.1f;
|
|
// //g_log->TraceInfo(_(u8"更改虑芯清洗氧含量设值:%.2f").c_str(), m_PurifierShowBean.filterCleanOxygenSetValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"打印室清洗氧含量设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("printCleanOxygenSetValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.printCleanOxygenSetValue = purifierstatXT.printCleanOxygenSetValue;
|
|
// if (ImGui::InputFloatEx("PPM", &m_PurifierShowBean.printCleanOxygenSetValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// if (m_PurifierShowBean.printCleanOxygenSetValue < 0)m_PurifierShowBean.printCleanOxygenSetValue = 0;
|
|
// m_Client->SetPrintCleanOxygenSetValue(m_PurifierShowBean.printCleanOxygenSetValue);
|
|
// g_log->TraceInfo(_(u8"更改打印室清洗氧含量设值:%.2f").c_str(), m_PurifierShowBean.printCleanOxygenSetValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"打印氧上限设定:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("printOxygenUpSetValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.printOxygenUpSetValue = purifierstatXT.printOxygenUpSetValue;
|
|
// if (ImGui::InputFloatEx("PPM", &m_PurifierShowBean.printOxygenUpSetValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// if (m_PurifierShowBean.printOxygenUpSetValue < 0)m_PurifierShowBean.printOxygenUpSetValue = 0;
|
|
// m_Client->SetPrintOxygenUpSetValue(m_PurifierShowBean.printOxygenUpSetValue);
|
|
// g_log->TraceInfo(_(u8"更改打印氧上限设定:%.2f").c_str(), m_PurifierShowBean.printOxygenUpSetValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"打印氧超上限设定:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("oxygenAlarmValue");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.oxygenAlarmValue = purifierstatXT.oxygenAlarmValue;
|
|
// if (ImGui::InputFloatEx("PPM", &m_PurifierShowBean.oxygenAlarmValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// if (m_PurifierShowBean.oxygenAlarmValue < 0)m_PurifierShowBean.oxygenAlarmValue = 0;
|
|
// m_Client->SetOxygenAlarmValue(m_PurifierShowBean.oxygenAlarmValue);
|
|
// g_log->TraceInfo(_(u8"更改打印氧超上限设定:%.2f").c_str(), m_PurifierShowBean.oxygenAlarmValue);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"料斗清理预警时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("hopperCleanRemind");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.hopperCleanRemind = purifierstatXT.hopperCleanRemind;
|
|
// if (ImGui::InputScalarEx("h", ImGuiDataType_U16, &m_PurifierShowBean.hopperCleanRemind, 0, 0, "%u", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetHopperCleanRemind(m_PurifierShowBean.hopperCleanRemind);
|
|
// g_log->TraceInfo(_(u8"更改料斗清理预警时间:%u").c_str(), m_PurifierShowBean.hopperCleanRemind);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"打印机清洗滞后:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("boxWashDelayTime");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.boxWashDelayTime = purifierstatXT.boxWashDelayTime;
|
|
// if (ImGui::InputScalarEx("min", ImGuiDataType_U16, &m_PurifierShowBean.boxWashDelayTime, 0, 0, "%u", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetBoxWashDelayTime(m_PurifierShowBean.boxWashDelayTime);
|
|
// g_log->TraceInfo(_(u8"更改打印机清洗滞后:%u").c_str(), m_PurifierShowBean.boxWashDelayTime);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"除尘系统清洗滞后:").c_str()); ImGui::SameLine();
|
|
// ImGui::PushID("dedustingWashDelayTime");
|
|
// ImGui::PushItemWidth(inputWidth);
|
|
// m_PurifierShowBean.dedustingWashDelayTime = purifierstatXT.dedustingWashDelayTime;
|
|
// if (ImGui::InputScalarEx("min", ImGuiDataType_U16, &m_PurifierShowBean.dedustingWashDelayTime, 0, 0, "%u", ImGuiInputTextFlags_EnterReturnsTrue)) {
|
|
// m_Client->SetDedustingWashDelayTime(m_PurifierShowBean.dedustingWashDelayTime);
|
|
// g_log->TraceInfo(_(u8"更改尘系统清洗滞后:%u").c_str(), m_PurifierShowBean.dedustingWashDelayTime);
|
|
// }
|
|
// ImGui::PopItemWidth();
|
|
// ImGui::PopID();
|
|
//
|
|
// ImGui::Text(_(u8"心跳:%d").c_str(), purifierstatXT.keepAlive);
|
|
//
|
|
//
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 20);
|
|
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
|
// ImGui::SameLine();
|
|
//
|
|
// ImGui::BeginGroup();
|
|
// ImGui::Text(_(u8"中效高温报警").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midTempOverLimitAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"中效超高温报警").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midHighTempOverLimitAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"料斗使用时间过长").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.hopperUseLongTimeAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"高压气气压不足").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.highPressureLackValveAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"变频器电源断开").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.inverterPowerBreak)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"变频器报警").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.inverterAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"打印室废气阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.innerfilterOpenAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"变频器通讯异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.inverterComException)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"循环进气阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.cycleInValveOpenAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"循环出气阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.cycleOutValueOpenAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"中高效阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midHighValveOpenAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"内过滤循环进气阀异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.innerFilterInValveException)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"中效联通阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midUnionValveException)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"中效滤芯堵塞严重").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midFilterBlockAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"高效滤芯堵塞严重").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.highFilterBlockAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
//
|
|
// if (ImGui::Button(_(u8"料斗报警消除").c_str())) {
|
|
// m_Client->ClearHopperAlarm();
|
|
// }
|
|
//
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 20);
|
|
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
|
// ImGui::SameLine();
|
|
//
|
|
// ImGui::BeginGroup();
|
|
//
|
|
// ImGui::Text(_(u8"在一键清洗:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isPurifying)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"在除尘:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isDedusting)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"箱体在清洗:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isBoxCleaning)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"在反吹:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isBlowBack)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"滤芯在废处理:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isFilterDiscarding)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"滤芯在清洗:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isFilterCleaning)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"料斗在清洗:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isHopperCleaning)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程一键清洗").c_str(), purifierstatXT.isPurifying))
|
|
// {
|
|
// m_Client->SetPurify(!purifierstatXT.isPurifying);
|
|
// g_log->TraceInfo(_(u8"更改远程一键清洗:%d").c_str(), !purifierstatXT.isPurifying);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程一键清洗").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程除尘").c_str(), purifierstatXT.isDedusting))
|
|
// {
|
|
// if (!purifierstatXT.isDedusting) {
|
|
// if ((g_SystemInfo->m_ComPrintOxygen1 > m_RunCfg->GetOxygenAlarmValue()) || (g_SystemInfo->m_ComPrintOxygen2 > m_RunCfg->GetOxygenAlarmValue())) {
|
|
// g_Toast->AddToast(new ToastBean(_(u8"氧含量高于报警值,不能执行循环").c_str(), 3000, Toast::COLOR_RED));
|
|
// }
|
|
// else {
|
|
// m_Client->SetDedust(!purifierstatXT.isDedusting);
|
|
// g_log->TraceInfo(_(u8"更改远程除尘:%d").c_str(), !purifierstatXT.isDedusting);
|
|
// }
|
|
// }
|
|
// else {
|
|
// m_Client->SetDedust(!purifierstatXT.isDedusting);
|
|
// g_log->TraceInfo(_(u8"更改远程除尘:%d").c_str(), !purifierstatXT.isDedusting);
|
|
// }
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程除尘").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程滤芯废处理").c_str(), purifierstatXT.isFilterDiscarding))
|
|
// {
|
|
// if (!purifierstatXT.isFilterDiscarding) {
|
|
// ImGui::OpenPopup(_(u8"远程滤芯废处理确认").c_str());
|
|
// }
|
|
// else {
|
|
// m_Client->SetFilterDiscard(!purifierstatXT.isFilterDiscarding);
|
|
// }
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程滤芯废处理").c_str());
|
|
//
|
|
// if (ImGui::BeginPopupModal(_(u8"远程滤芯废处理确认").c_str(), NULL, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize))
|
|
// {
|
|
// ImGui::Text(_(u8"请确认是否执行远程滤芯废处理?").c_str());
|
|
// ImGui::Separator();
|
|
// if (ImGui::Button(_(u8"执行").c_str(), ImVec2(80, 0))) {
|
|
// m_Client->SetFilterDiscard(true);
|
|
// g_log->TraceInfo(_(u8"执行远程滤芯废处理").c_str());
|
|
// ImGui::CloseCurrentPopup();
|
|
// }
|
|
// ImGui::SameLine(0, 80);
|
|
// if (ImGui::Button(_(u8"取消").c_str(), ImVec2(80, 0))) {
|
|
// ImGui::CloseCurrentPopup();
|
|
// }
|
|
// ImGui::EndPopup();
|
|
// }
|
|
//
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程箱体清洗").c_str(), purifierstatXT.isBoxCleaning))
|
|
// {
|
|
// m_Client->SetBoxClean(!purifierstatXT.isBoxCleaning);
|
|
// g_log->TraceInfo(_(u8"更改远程箱体清洗:%d").c_str(), !purifierstatXT.isBoxCleaning);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程箱体清洗").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程滤芯清洗").c_str(), purifierstatXT.isFilterCleaning))
|
|
// {
|
|
// m_Client->SetFilterClean(!purifierstatXT.isFilterCleaning);
|
|
// g_log->TraceInfo(_(u8"更改远程滤芯清洗:%d").c_str(), !purifierstatXT.isFilterCleaning);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程滤芯清洗").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程料斗清洗").c_str(), purifierstatXT.isHopperCleaning))
|
|
// {
|
|
// m_Client->SetHopperClean(!purifierstatXT.isHopperCleaning);
|
|
// g_log->TraceInfo(_(u8"更改远程料斗清洗:%d").c_str(), !purifierstatXT.isHopperCleaning);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程料斗清洗").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程反吹").c_str(), purifierstatXT.isBlowBack))
|
|
// {
|
|
// if (!purifierstatXT.isBlowBack) {
|
|
// if ((g_SystemInfo->m_ComPrintOxygen1 > m_RunCfg->GetOxygenAlarmValue()) || (g_SystemInfo->m_ComPrintOxygen2 > m_RunCfg->GetOxygenAlarmValue())) {
|
|
// g_Toast->AddToast(new ToastBean(_(u8"氧含量高于报警值,不能执行反吹").c_str(), 4000, Toast::COLOR_RED));
|
|
// }
|
|
// else {
|
|
// m_Client->SetBlowBack(!purifierstatXT.isBlowBack);
|
|
// g_log->TraceInfo(_(u8"更改远程反吹:%d").c_str(), !purifierstatXT.isBlowBack);
|
|
// }
|
|
// }
|
|
// else {
|
|
// m_Client->SetBlowBack(!purifierstatXT.isBlowBack);
|
|
// g_log->TraceInfo(_(u8"更改远程反吹:%d").c_str(), !purifierstatXT.isBlowBack);
|
|
// }
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程反吹").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"测试气密性").c_str(), m_ManualCheckAirTightness)) {
|
|
// m_ManualCheckAirTightness = !m_ManualCheckAirTightness;
|
|
// g_log->TraceInfo(_(u8"更改测试气密性:%d").c_str(), m_ManualCheckAirTightness);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"测试气密性").c_str());
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 20);
|
|
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
|
// ImGui::End();
|
|
//}
|
|
|
|
//void XTPurifier::DrawUserUI()
|
|
//{
|
|
// Purifierstat_XT purifierstatXT;
|
|
// m_Client->GetStat(purifierstatXT);
|
|
//
|
|
// ImGui::Begin(_(u8"净化器").c_str(), &m_PurifierWinShow, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_HorizontalScrollbar);
|
|
// //ImGui::SetWindowFontScale(1.2);
|
|
//
|
|
// float inputWidth = 80.0f;
|
|
// ImGui::BeginGroup();
|
|
//
|
|
// ImGui::Text(_(u8"净化器端口连接:").c_str()); ImGui::SameLine();
|
|
// if (m_Client->IsServerConnected())ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"正常").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"断开").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"净化器通讯连接:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.baseStat.isConnected)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"正常").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"断开").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"类型:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%d", purifierstatXT.purifierType);
|
|
// ImGui::Text(_(u8"中效压力值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.midPressureValue);
|
|
//
|
|
// ImGui::Text(_(u8"中效压差值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.midPressureDifValue);
|
|
//
|
|
// ImGui::Text(_(u8"高效压差值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.highPressureDifValue);
|
|
//
|
|
// ImGui::Text(_(u8"中效温度:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f ℃", purifierstatXT.midTemperatureValue);
|
|
//
|
|
// ImGui::Text(_(u8"中效压差报警设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.midPressureDifAlarmValue);
|
|
//
|
|
// ImGui::Text(_(u8"高效压差报警设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.highPressureDifAlarmValue);
|
|
//
|
|
// ImGui::Text(_(u8"箱体压力上限:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.boxPressureUpLimit);
|
|
//
|
|
// ImGui::Text(_(u8"箱体压力下限:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f kpa", purifierstatXT.boxPressureDownLimit);
|
|
//
|
|
// //ImGui::Text(_(u8"压力量程上限:").c_str()); ImGui::SameLine();
|
|
// //ImGui::Text("%.2f mbar", purifierstatXT.pressureRangeUpLimit);
|
|
//
|
|
// //ImGui::Text(_(u8"压力量程下限:").c_str()); ImGui::SameLine();
|
|
// //ImGui::Text("%.2f mbar", purifierstatXT.pressureRangeDownLimit);
|
|
//
|
|
// ImGui::Text(_(u8"中效高温报警设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f ℃", purifierstatXT.midTempHighSetValue);
|
|
//
|
|
// ImGui::Text(_(u8"中效超高温报警设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f ℃", purifierstatXT.midTempUltraSetValue);
|
|
//
|
|
// ImGui::Text(_(u8"风机频率过低报警值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f Hz", m_RunCfg->m_FanFreqLowLimit);
|
|
//
|
|
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
|
// ImGui::Checkbox(_(u8"铺粉风速控制").c_str(), &purifierstatXT.isCoverWind);
|
|
// ImGui::Checkbox(_(u8"使用铺粉风速信号").c_str(), &m_RunCfg->m_UseCoverWindSignal);
|
|
// ImGui::Checkbox(_(u8"铺粉风速完成信号").c_str(), &purifierstatXT.coverWindSlowFinish);
|
|
// ImGui::Checkbox(_(u8"铺粉风速恢复信号").c_str(), &purifierstatXT.coverWindResumeFinish);
|
|
// ImGui::PopItemFlag();
|
|
//
|
|
// ImGui::Text(_(u8"铺粉风速比率:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f", m_PurifierShowBean.coverWindSpeedOffset);
|
|
//
|
|
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
|
// ImGui::Checkbox(_(u8"打印换气").c_str(), &m_RunCfg->m_PrintAutoRenewalGas);
|
|
// ImGui::Checkbox(_(u8"屏蔽监测压力").c_str(), &purifierstatXT.shieldMonitorPrintPressure);
|
|
// ImGui::PopItemFlag();
|
|
//
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 20);
|
|
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
|
// ImGui::SameLine();
|
|
//
|
|
// ImGui::BeginGroup();
|
|
// ImGui::Text(_(u8"风速计实际值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f", purifierstatXT.anemometerActualValue);
|
|
//
|
|
// ImGui::Text(_(u8"循环风速:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f M³/H", purifierstatXT.windActualValue);
|
|
//
|
|
// ImGui::Text(_(u8"风机频率:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f Hz", purifierstatXT.fanFreq);
|
|
//
|
|
// ImGui::Text(_(u8"除尘系统氧含量:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f %%", purifierstatXT.filterOxygenValue);
|
|
//
|
|
// ImGui::Text(_(u8"打印室氧含量:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f PPM", purifierstatXT.printOxygenValue);
|
|
//
|
|
// ImGui::Text(_(u8"滤芯使用总时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u h", purifierstatXT.filterTotalUseTime);
|
|
//
|
|
// ImGui::Text(_(u8"反吹总次数:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u", purifierstatXT.bowBackTimes);
|
|
//
|
|
// ImGui::Text(_(u8"上次反吹后已使用时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u h", purifierstatXT.usedTimeFromlastBowBack);
|
|
//
|
|
// ImGui::Text(_(u8"箱体本次清洗时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u min", purifierstatXT.boxWashTime);
|
|
//
|
|
// ImGui::Text(_(u8"除尘系统本次清洗时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u min", purifierstatXT.filterWashTime);
|
|
//
|
|
// ImGui::Text(_(u8"风速设定:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f M³/H", purifierstatXT.windSetValue);
|
|
//
|
|
// ImGui::Text(_(u8"最大风速设定:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text(u8"%.2f M³/H", purifierstatXT.maxWindSetValue);
|
|
//
|
|
// ImGui::Text(_(u8"滤芯清洗氧含量设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f %%", purifierstatXT.filterCleanOxygenSetValue);
|
|
//
|
|
// ImGui::Text(_(u8"滤芯氧含量报警值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f %%", m_RunCfg->m_FilterOxygenAlarmValue);
|
|
//
|
|
// ImGui::Text(_(u8"打印室清洗氧含量设值:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f PPM", purifierstatXT.printCleanOxygenSetValue);
|
|
//
|
|
// ImGui::Text(_(u8"打印氧上限设定:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f PPM", purifierstatXT.printOxygenUpSetValue);
|
|
//
|
|
// ImGui::Text(_(u8"打印氧超上限设定:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%.2f PPM", purifierstatXT.oxygenAlarmValue);
|
|
//
|
|
// ImGui::Text(_(u8"料斗清理预警时间:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u h", purifierstatXT.hopperCleanRemind);
|
|
//
|
|
//
|
|
// ImGui::Text(_(u8"打印机清洗滞后:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u min", purifierstatXT.boxWashDelayTime);
|
|
//
|
|
// ImGui::Text(_(u8"除尘系统清洗滞后:").c_str()); ImGui::SameLine();
|
|
// ImGui::Text("%u min", purifierstatXT.dedustingWashDelayTime);
|
|
//
|
|
// ImGui::Text(_(u8"心跳:%d").c_str(), purifierstatXT.keepAlive);
|
|
//
|
|
//
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 20);
|
|
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
|
// ImGui::SameLine();
|
|
//
|
|
// ImGui::BeginGroup();
|
|
// ImGui::Text(_(u8"中效高温报警").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midTempOverLimitAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"中效超高温报警").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midHighTempOverLimitAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"料斗使用时间过长").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.hopperUseLongTimeAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"高压气气压不足").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.highPressureLackValveAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"变频器电源断开").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.inverterPowerBreak)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"变频器报警").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.inverterAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"打印室废气阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.innerfilterOpenAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"变频器通讯异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.inverterComException)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"循环进气阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.cycleInValveOpenAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"循环出气阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.cycleOutValueOpenAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"中高效阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midHighValveOpenAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"内过滤循环进气阀异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.innerFilterInValveException)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"中效联通阀打开异常").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midUnionValveException)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"中效滤芯堵塞严重").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.midFilterBlockAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"高效滤芯堵塞严重").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.highFilterBlockAlarm)ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
//
|
|
// if (ImGui::Button(_(u8"料斗报警消除").c_str())) {
|
|
// m_Client->ClearHopperAlarm();
|
|
// }
|
|
//
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 20);
|
|
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
|
// ImGui::SameLine();
|
|
//
|
|
// ImGui::BeginGroup();
|
|
//
|
|
// ImGui::Text(_(u8"在一键清洗:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isPurifying)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"在除尘:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isDedusting)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"箱体在清洗:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isBoxCleaning)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"在反吹:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isBlowBack)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"滤芯在废处理:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isFilterDiscarding)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"滤芯在清洗:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isFilterCleaning)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Text(_(u8"料斗在清洗:").c_str()); ImGui::SameLine();
|
|
// if (purifierstatXT.isHopperCleaning)ImGui::TextColored(ImVec4(0.0, 1.0, 0.0, 1.0), _(u8"是").c_str());
|
|
// else ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), _(u8"否").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程一键清洗").c_str(), purifierstatXT.isPurifying))
|
|
// {
|
|
// m_Client->SetPurify(!purifierstatXT.isPurifying);
|
|
// g_log->TraceInfo(_(u8"更改远程一键清洗:%d").c_str(), !purifierstatXT.isPurifying);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程一键清洗").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程除尘").c_str(), purifierstatXT.isDedusting))
|
|
// {
|
|
// if (!purifierstatXT.isDedusting) {
|
|
// if ((g_SystemInfo->m_ComPrintOxygen1 > m_RunCfg->GetOxygenAlarmValue()) || (g_SystemInfo->m_ComPrintOxygen2 > m_RunCfg->GetOxygenAlarmValue())) {
|
|
// g_Toast->AddToast(new ToastBean(_(u8"氧含量高于报警值,不能执行循环").c_str(), 3000, Toast::COLOR_RED));
|
|
// }
|
|
// else {
|
|
// m_Client->SetDedust(!purifierstatXT.isDedusting);
|
|
// g_log->TraceInfo(_(u8"更改远程除尘:%d").c_str(), !purifierstatXT.isDedusting);
|
|
// }
|
|
// }
|
|
// else {
|
|
// m_Client->SetDedust(!purifierstatXT.isDedusting);
|
|
// g_log->TraceInfo(_(u8"更改远程除尘:%d").c_str(), !purifierstatXT.isDedusting);
|
|
// }
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程除尘").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程滤芯废处理").c_str(), purifierstatXT.isFilterDiscarding))
|
|
// {
|
|
// if (!purifierstatXT.isFilterDiscarding) {
|
|
// ImGui::OpenPopup(_(u8"远程滤芯废处理确认").c_str());
|
|
// }
|
|
// else {
|
|
// m_Client->SetFilterDiscard(!purifierstatXT.isFilterDiscarding);
|
|
// }
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程滤芯废处理").c_str());
|
|
//
|
|
// if (ImGui::BeginPopupModal(_(u8"远程滤芯废处理确认").c_str(), NULL, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize))
|
|
// {
|
|
// ImGui::Text(_(u8"请确认是否执行远程滤芯废处理?").c_str());
|
|
// ImGui::Separator();
|
|
// if (ImGui::Button(_(u8"执行").c_str(), ImVec2(80, 0))) {
|
|
// m_Client->SetFilterDiscard(true);
|
|
// g_log->TraceInfo(_(u8"执行远程滤芯废处理").c_str());
|
|
// ImGui::CloseCurrentPopup();
|
|
// }
|
|
// ImGui::SameLine(0, 80);
|
|
// if (ImGui::Button(_(u8"取消").c_str(), ImVec2(80, 0))) {
|
|
// ImGui::CloseCurrentPopup();
|
|
// }
|
|
// ImGui::EndPopup();
|
|
// }
|
|
//
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程箱体清洗").c_str(), purifierstatXT.isBoxCleaning))
|
|
// {
|
|
// m_Client->SetBoxClean(!purifierstatXT.isBoxCleaning);
|
|
// g_log->TraceInfo(_(u8"更改远程箱体清洗:%d").c_str(), !purifierstatXT.isBoxCleaning);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程箱体清洗").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程滤芯清洗").c_str(), purifierstatXT.isFilterCleaning))
|
|
// {
|
|
// m_Client->SetFilterClean(!purifierstatXT.isFilterCleaning);
|
|
// g_log->TraceInfo(_(u8"更改远程滤芯清洗:%d").c_str(), !purifierstatXT.isFilterCleaning);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程滤芯清洗").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程料斗清洗").c_str(), purifierstatXT.isHopperCleaning))
|
|
// {
|
|
// m_Client->SetHopperClean(!purifierstatXT.isHopperCleaning);
|
|
// g_log->TraceInfo(_(u8"更改远程料斗清洗:%d").c_str(), !purifierstatXT.isHopperCleaning);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程料斗清洗").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"远程反吹").c_str(), purifierstatXT.isBlowBack))
|
|
// {
|
|
// if (!purifierstatXT.isBlowBack) {
|
|
// if ((g_SystemInfo->m_ComPrintOxygen1 > m_RunCfg->GetOxygenAlarmValue()) || (g_SystemInfo->m_ComPrintOxygen2 > m_RunCfg->GetOxygenAlarmValue())) {
|
|
// g_Toast->AddToast(new ToastBean(_(u8"氧含量高于报警值,不能执行反吹").c_str(), 4000, Toast::COLOR_RED));
|
|
// }
|
|
// else {
|
|
// m_Client->SetBlowBack(!purifierstatXT.isBlowBack);
|
|
// g_log->TraceInfo(_(u8"更改远程反吹:%d").c_str(), !purifierstatXT.isBlowBack);
|
|
// }
|
|
// }
|
|
// else {
|
|
// m_Client->SetBlowBack(!purifierstatXT.isBlowBack);
|
|
// g_log->TraceInfo(_(u8"更改远程反吹:%d").c_str(), !purifierstatXT.isBlowBack);
|
|
// }
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"远程反吹").c_str());
|
|
//
|
|
// ImGui::Dummy(ImVec2(0, 10));
|
|
// if (ImGui::ToggleButton(_(u8"测试气密性").c_str(), m_ManualCheckAirTightness)) {
|
|
// m_ManualCheckAirTightness = !m_ManualCheckAirTightness;
|
|
// g_log->TraceInfo(_(u8"更改测试气密性:%d").c_str(), m_ManualCheckAirTightness);
|
|
// }
|
|
// ImGui::SameLine();
|
|
// ImGui::Text(_(u8"测试气密性").c_str());
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 20);
|
|
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
|
|
// ImGui::End();
|
|
//}
|
|
|
|
|
|
double XTPurifier::GetWindValue(double dvalue)
|
|
{
|
|
return m_State.windActualValue;
|
|
}
|
|
|
|
//void XTPurifier::DrawConfig()
|
|
//{
|
|
// ImGui::BeginGroup();
|
|
// if (ImGui::InputFloat(_(u8"氮气风速等待差值").c_str(), &m_ExtCfg->m_NitrogenFit.checkWindOffset, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue))
|
|
// {
|
|
// if (m_ExtCfg->m_NitrogenFit.checkWindOffset < 0.0f)m_ExtCfg->m_NitrogenFit.checkWindOffset = 0.0f;
|
|
// if (m_ExtCfg->m_NitrogenFit.checkWindOffset > 10.0f)m_ExtCfg->m_NitrogenFit.checkWindOffset = 10.0f;
|
|
// //if (m_ExtCfg->m_NitrogenFit.checkWindOffset > m_State.windSetValue)m_ExtCfg->m_NitrogenFit.checkWindOffset = m_State.windSetValue;
|
|
// }
|
|
//
|
|
// if (ImGui::InputFloat(_(u8"氮气风速下限百分比").c_str(), &m_ExtCfg->m_NitrogenFit.checkAlarmPercent, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue))
|
|
// {
|
|
// }
|
|
// vector<string> combvec = { _(u8"氮气"),_(u8"氩气") };
|
|
// if (ImGui::SemicolonCombo(_(u8"气体").c_str(), &m_ExtCfg->m_SelectedFanWindFit, combvec))
|
|
// {
|
|
// if (m_ExtCfg->m_SelectedFanWindFit == m_ExtCfg->ARGON_FIT_INDEX) {
|
|
// m_Client->SetUseArgon(true);
|
|
// }
|
|
// else {
|
|
// m_Client->SetUseArgon(false);
|
|
// }
|
|
// }
|
|
// ImGui::EndGroup();
|
|
// ImGui::SameLine(0, 30);
|
|
//
|
|
// ImGui::BeginGroup();
|
|
// if (ImGui::InputFloat(_(u8"氩气风速等待差值").c_str(), &m_ExtCfg->m_ArgonFit.checkWindOffset, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue))
|
|
// {
|
|
// if (m_ExtCfg->m_ArgonFit.checkWindOffset < 0.0f)m_ExtCfg->m_ArgonFit.checkWindOffset = 0.0f;
|
|
// if (m_ExtCfg->m_ArgonFit.checkWindOffset > 10.0f)m_ExtCfg->m_ArgonFit.checkWindOffset = 10.0f;
|
|
// //if (m_ExtCfg->m_ArgonFit.checkWindOffset > m_State.windSetValue)m_ExtCfg->m_ArgonFit.checkWindOffset = m_State.windSetValue;
|
|
// }
|
|
//
|
|
// if (ImGui::InputFloat(_(u8"氩气风速下限百分比").c_str(), &m_ExtCfg->m_ArgonFit.checkAlarmPercent, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue))
|
|
// {
|
|
// }
|
|
//
|
|
// ImGui::EndGroup();
|
|
//}
|
|
|
|
bool XTPurifier::IsConnectAlarm()
|
|
{
|
|
bool tickRel = false;
|
|
bool countRel = false;
|
|
bool isConnect = m_Client->IsServerConnected();
|
|
int checkTick = m_RunCfg->m_PurifierDisconnectAlarmJudgeSecond * 1000;
|
|
int countTick = m_RunCfg->m_PurifierDisconnectAlarmJudgeSecond * 1000 / m_CycleTick;
|
|
if (isConnect) {
|
|
m_ConnectAlarmTick = GetTickCount64();
|
|
m_ConnectAlarmCountTick = 0;
|
|
}
|
|
else {
|
|
if (m_PreConnectState) {
|
|
m_ConnectAlarmTick = GetTickCount64();
|
|
}
|
|
else {
|
|
uint64_t tnow = GetTickCount64();
|
|
if (tnow - m_ConnectAlarmTick > checkTick) {
|
|
tickRel = true;
|
|
}
|
|
}
|
|
m_ConnectAlarmCountTick++;
|
|
if (m_ConnectAlarmCountTick > countTick)
|
|
{
|
|
m_ConnectAlarmCountTick = countTick + 1;
|
|
countRel = true;
|
|
}
|
|
}
|
|
m_PreConnectState = isConnect;
|
|
return (tickRel && countRel);
|
|
}
|
|
|
|
|
|
bool XTPurifier::IsWindActive()
|
|
{
|
|
Purifierstat_XT stat;
|
|
m_Client->GetStat(stat);
|
|
return stat.isDedusting;
|
|
}
|
|
|
|
void XTPurifier::SetCoverWind(bool bvalue)
|
|
{
|
|
m_Client->SetCoverWind(bvalue);
|
|
}
|
|
|
|
bool XTPurifier::IsCoverWindRecover()
|
|
{
|
|
bool rel = false;
|
|
Purifierstat_XT stat;
|
|
m_Client->GetStat(stat);
|
|
if (m_RunCfg->m_UseCoverWindSignal)
|
|
{
|
|
if (stat.coverWindResumeFinish)
|
|
{
|
|
rel = true;
|
|
}
|
|
}
|
|
else {
|
|
FanFit* al = m_ExtCfg->m_FanWindFit[m_ExtCfg->m_SelectedFanWindFit];
|
|
if ((stat.windSetValue - stat.windActualValue) < al->checkWindOffset) {
|
|
rel = true;
|
|
}
|
|
}
|
|
return rel;
|
|
}
|
|
|
|
bool XTPurifier::IsCoverWindSlow()
|
|
{
|
|
bool rel = false;
|
|
Purifierstat_XT stat;
|
|
m_Client->GetStat(stat);
|
|
if (m_RunCfg->m_UseCoverWindSignal)
|
|
{
|
|
if (stat.coverWindSlowFinish) {
|
|
rel = true;
|
|
}
|
|
}
|
|
else {
|
|
FanFit* al = m_ExtCfg->m_FanWindFit[m_ExtCfg->m_SelectedFanWindFit];
|
|
if ((stat.windActualValue - (stat.windSetValue*stat.coverWindSpeedOffset)) < al->checkWindOffset) {
|
|
rel = true;
|
|
}
|
|
}
|
|
return rel;
|
|
}
|
|
|
|
void XTPurifier::ResetSlowWind()
|
|
{
|
|
m_Client->SetCoverWind(false);
|
|
|
|
}
|
|
|
|
bool XTPurifier::IsCoverWindSet()
|
|
{
|
|
Purifierstat_XT stat;
|
|
m_Client->GetStat(stat);
|
|
return stat.isCoverWind;
|
|
}
|
|
|
|
void XTPurifier::ResetSlwoWindSignal(bool precover)
|
|
{
|
|
if (precover)
|
|
{
|
|
m_Client->SetWindSlowFinishSignal(false);
|
|
}
|
|
else {
|
|
m_Client->SetWindResumeFinishSignal(false);
|
|
}
|
|
}
|
|
|
|
int XTPurifier::GetFilterUseTime()
|
|
{
|
|
Purifierstat_XT stat;
|
|
m_Client->GetStat(stat);
|
|
return stat.filterTotalUseTime;
|
|
}
|
|
/*
|
|
void XTPurifier::DrawFinishReportRel()
|
|
{
|
|
ImGui::Dummy(ImVec2(0, 10));
|
|
if (m_State.protectionPressureEnable) {
|
|
float prg = GetFinishPrintTestProgress();
|
|
ImGui::Text(_(u8"自测:").c_str()); ImGui::SameLine();
|
|
char buffer[256];
|
|
sprintf_s(buffer, sizeof(buffer), "%.0f%%", prg * 100.0f);
|
|
ImGui::ProgressBar(prg, ImVec2(250, 0), buffer);
|
|
}
|
|
if (m_RunCfg->m_BlowBackNotifyAfterPrint)
|
|
{
|
|
float prg = GetFinishPrintBlowbackProgress();
|
|
string info = GetFinishPrintBlowbackInfo();
|
|
ImGui::Text(_(u8"反吹:").c_str()); ImGui::SameLine();
|
|
char buffer[256];
|
|
sprintf_s(buffer, sizeof(buffer), "%s %.0f%%", info.c_str(), prg * 100.0f);
|
|
ImGui::ProgressBar(prg, ImVec2(250, 0), buffer);
|
|
}
|
|
ImGui::Dummy(ImVec2(0, 10));
|
|
}*/
|
|
|
|
|
|
void XTPurifier::SendToClients() {
|
|
m_Client->SendToClients(PURIFIERPARAM);
|
|
|
|
} |