GrpcPrint/PrintS/Purifier/M1Purifier.cpp
2024-05-28 13:28:07 +08:00

2112 lines
80 KiB
C++

#include "M1Purifier.h"
#include "../external/imgui/imgui_custom.h"
#include "../config/ConfigManager.h"
#include "../Logger.h"
#include "../SystemInfo.h"
#include "../Toast.h"
#include "../ScannerCtrl/BaseCtrl.h"
#include "../global.h"
#include "../plc/SignalService.h"
M1Purifier::M1Purifier(ScannerCtrl* scannerCtrl)
:m_ScannerCtrl(scannerCtrl)
, m_Client(NULL)
, m_PreConnectState(false)
, m_ManualCheckAirTightness(false)
{
m_ConnectAlarmTick = GetTickCount64();
m_LastKeepAlive = 0;
m_FinishPrintBlowbackStep = Ready;
}
M1Purifier::~M1Purifier()
{
if (m_Client)delete m_Client;
}
void M1Purifier::Init()
{
map<string, CommunicationCfg*>* cfg = ConfigManager::GetInstance()->GetCommunicationCfg();
m_RunCfg = ConfigManager::GetInstance()->GetRunCfg();
m_Client = new M1PurifierClient((*cfg)["M1_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 M1Purifier::AutoCtrlWhenDoorOpen()
{
if (m_State.m_IsCycleDedust) {
m_Client->SetDedust(false);
int waitcount = 0;
M1Info xt;
while (waitcount < 60) {
Sleep(50);
m_Client->GetInfo(xt);
if (!xt.m_IsCycleDedust) {
break;
}
waitcount++;
}
}
if (m_State.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(false);
int waitcount = 0;
M1Info xt;
while (waitcount < 60) {
Sleep(50);
m_Client->GetInfo(xt);
if (!xt.m_IsOneKeyDeoxygen) {
break;
}
waitcount++;
}
g_Toast->AddToast(new ToastBean(_(u8"关闭除氧:舱门打开").c_str(), 3000, Toast::COLOR_ORANGE));
}
}
void M1Purifier::AutoCtrlWhenPrint()
{
}
void M1Purifier::AutoCtrlWhenStanby()
{
if (m_State.m_IsOneKeyDeoxygen)
{
bool isLowerTarge = (g_SystemInfo->GetOxygenRealTimeMaxValue() < m_RunCfg->m_TargeOxygen->GetValue());
if (isLowerTarge && (m_State.m_PurifierOxygenValue <= m_State.m_PurifierDeoxygenTargeValue)) {
m_Client->SetOneKeyDeoxygen(false);
int waitcount = 0;
while (waitcount < 60) {
Sleep(50);
UpdateShowStat();
if (!m_State.m_IsOneKeyDeoxygen) {
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.m_IsCycleDedust) {
g_Toast->AddToast(new ToastBean(_(u8"开启除尘").c_str(), 3000));
break;
}
waitcount++;
}
}
}
}
void M1Purifier::HandlePrintFinish()
{
StopAutoDeoxygen();
UpdateShowStat();
if (m_RunCfg->m_BlowBackNotifyAfterPrint->GetValue()) {
UpdateShowStat();
m_FinishPrintBlowbackStep = Ready;
m_FinishPrintBlowbackProgress = 0.0f;
if (m_State.m_BaseStat.isConnected && !m_RunCfg->m_IsDebugMode->GetValue() && g_SystemInfo->m_EnvState.m_IsPrintCabinDoorClose) {
Sleep(3000);
M1Info stat;
m_Client->GetInfo(stat);
if (stat.m_PurifierOxygenValue > stat.m_PurifierDeoxygenTargeValue) {
m_FinishPrintBlowbackStep = Deoxygen;
if (stat.m_IsCycleDedust) {
m_Client->SetDedust(false);
Sleep(3000);
}
m_Client->GetInfo(stat);
if (!stat.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(true);
Sleep(3000);
}
m_Client->GetInfo(stat);
int count = 0;
float sfvalue = stat.m_PurifierDeoxygenTargeValue - stat.m_PurifierOxygenValue;
if (sfvalue == 0.0f)sfvalue = 1.0f;
float svalue = stat.m_PurifierOxygenValue;
while (stat.m_IsOneKeyDeoxygen && BaseCtrl::IsFinish()) {
m_FinishPrintBlowbackProgress = (stat.m_PurifierOxygenValue - svalue) / sfvalue;
if (stat.m_PurifierOxygenValue <= stat.m_PurifierDeoxygenTargeValue) {
m_Client->SetOneKeyDeoxygen(false);
break;
}
Sleep(1000);
m_Client->GetInfo(stat);
}
}
Sleep(8000);
m_Client->GetInfo(stat);
if (stat.m_PurifierOxygenValue <= (m_RunCfg->m_FilterOxygenAlarmValue->GetValue())) {
m_FinishPrintBlowbackProgress = 0.0f;
m_FinishPrintBlowbackStep = Blowback;
int sumTime = stat.m_BlowbackTimes * 30 * 2;
if (sumTime == 0) {
sumTime = 20 * 60;
}
time_t tnow;
time(&tnow);
m_Client->SetBlowBack(true);
Sleep(5000);
g_log->TraceInfo(_(u8"执行自动反吹").c_str());
m_Client->GetInfo(stat);
while (stat.m_IsBlowback && BaseCtrl::IsFinish()) {
time_t tcal;
time(&tcal);
int dcal = tcal - tnow;
m_FinishPrintBlowbackProgress = (float)dcal / sumTime;
if (!stat.m_IsBlowback)
{
break;
}
Sleep(1000);
m_Client->GetInfo(stat);
}
m_Client->GetInfo(stat);
if (stat.m_IsBlowback)
{
m_Client->SetBlowBack(false);
Sleep(5000);
}
m_FinishPrintBlowbackProgress = 1.0f;
m_FinishPrintBlowbackStep = Finished;
}
else {
m_FinishPrintBlowbackProgress = 1.0f;
m_FinishPrintBlowbackStep = Forbid;
}
}
else {
m_FinishPrintBlowbackProgress = 1.0f;
m_FinishPrintBlowbackStep = Forbid;
}
}
}
void M1Purifier::HandlePrintStop()
{
if (m_State.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(false);
}
if (m_State.m_IsCycleDedust) {
m_Client->SetDedust(false);
}
int count = 0;
while (m_State.m_IsOneKeyDeoxygen && count < 20) {
count++;
Sleep(200);
UpdateShowStat();
}
count = 0;
while (m_State.m_IsCycleDedust && count < 20) {
count++;
Sleep(200);
UpdateShowStat();
}
}
void M1Purifier::StartAutoDeoxygen()
{
m_IsDeoxygenStarted = true;
m_LastStartDeoxygenTime = GetTickCount64();
m_HadCalcDeoxygenTime = false;
m_LastDeoxygenTime = 0.0f;
g_Toast->AddToast(new ToastBean(_(u8"开启除氧").c_str(), 3000));
bool isUpperTarge = (g_SystemInfo->GetOxygenRealTimeMinValue() > m_State.m_PrintRoomDeoxygenTargeValue) || (m_State.m_PurifierOxygenValue > m_State.m_PurifierDeoxygenTargeValue);
if (isUpperTarge) {
if (!m_State.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(true);
g_log->TraceInfo(_(u8"开启除氧").c_str());
}
}
else {
if (!m_State.m_IsCycleDedust) {
m_Client->SetDedust(true);
g_log->TraceInfo(_(u8"开启除尘").c_str());
}
}
}
void M1Purifier::StopAutoDeoxygen()
{
m_IsDeoxygenStarted = false;
g_Toast->AddToast(new ToastBean(_(u8"停止除氧").c_str(), 3000));
if (m_State.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(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.m_IsCycleDedust) {
m_Client->SetDedust(false);
g_log->TraceInfo(_(u8"停止除尘").c_str());
}
}
bool M1Purifier::IsAutoDeoxygen()
{
if (m_State.m_IsOneKeyDeoxygen || m_State.m_IsCycleDedust) return true;
else return false;
}
bool M1Purifier::HandleReadyPrint(bool startAfterPause, unsigned int& deoxytime)
{
//DWORD startTick = GetTickCount64();
if (m_State.m_IsBlowback) {
g_Toast->AddToast(new ToastBean(_(u8"终止:检测到正在反吹").c_str(), 5000, Toast::COLOR_RED));
return false;
}
bool isUpperTarge = (g_SystemInfo->GetOxygenRealTimeMinValue() > m_RunCfg->m_WarnOxygen->GetValue()) || (m_State.m_PurifierOxygenValue > m_State.m_PurifierDeoxygenTargeValue);
if (isUpperTarge) {
if (m_State.m_IsCycleDedust) {
m_Client->SetDedust(false);
Sleep(2000);
}
UpdateShowStat();
if (!m_State.m_IsOneKeyDeoxygen) {
g_Toast->AddToast(new ToastBean(_(u8"开启除氧").c_str(), 3000, ImVec4(0, 1, 0, 1)));
m_Client->SetOneKeyDeoxygen(true);
m_IsDeoxygenStarted = true;
m_LastStartDeoxygenTime = GetTickCount64();
m_HadCalcDeoxygenTime = false;
Sleep(3000);
}
}
UpdateShowStat();
BaseCtrl::SetPreState(BaseCtrl::Purifying);
int count = 0;
while (BaseCtrl::IsPrePrint() && (BaseCtrl::GetPreState() == BaseCtrl::Purifying) && m_State.m_IsOneKeyDeoxygen)
{
Sleep(500);
if (g_SystemInfo->GetOxygenRealTimeMaxValue() <= m_RunCfg->m_TargeOxygen->GetValue()) {
if (m_State.m_PurifierOxygenValue <= m_State.m_PurifierDeoxygenTargeValue) {
break;
}
else {
if ((count % 20) == 0) {
count = 0;
g_Toast->AddToast(new ToastBean(_(u8"正在等待净化器氧含量到达目标值").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
}
}
else {
if ((count % 20) == 0) {
count = 0;
g_Toast->AddToast(new ToastBean(_(u8"正在等待氧含量到达目标值").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
}
}
Sleep(500);
if (!BaseCtrl::IsPrePrint()) {
return false;
}
if (m_State.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(false);
Sleep(2000);
}
UpdateShowStat();
if (m_IsDeoxygenStarted && !m_HadCalcDeoxygenTime) {
m_LastDeoxygenTime = (GetTickCount64() - m_LastStartDeoxygenTime) / 1000.0f / 60.0f;
m_HadCalcDeoxygenTime = true;
}
deoxytime = m_LastDeoxygenTime * 60;
if (m_RunCfg->m_BlowBackNotifyBeforePrint->GetValue() && !startAfterPause && (g_SystemInfo->GetOxygenRealTimeMaxValue() <= m_RunCfg->m_WarnOxygen->GetValue()) && (m_State.m_PurifierOxygenValue <= m_State.m_PurifierDeoxygenTargeValue)) {
if (!m_ScannerCtrl->GetJobController()->GetJob()->m_IsAutoCtrl)
{
BaseCtrl::SetPreState(BaseCtrl::WaitBlowback);
Sleep(2000);
bool isconfirm = false;
while (BaseCtrl::IsPrePrint())
{
if (BaseCtrl::GetPreState() == BaseCtrl::WaitBlowbackCancelConfirm) {
break;
}
if (BaseCtrl::GetPreState() == BaseCtrl::WaitBlowbackSummitConfirm) {
isconfirm = true;
break;
}
Sleep(300);
}
if (isconfirm) {
m_Client->SetBlowBack(true);
Sleep(3000);
while (BaseCtrl::IsPrePrint()) {
UpdateShowStat();
if (!m_State.m_IsBlowback)
{
break;
}
Sleep(500);
}
}
}
}
if (!BaseCtrl::IsPrePrint()) {
return false;
}
float judgeOxygen = m_RunCfg->GetOxygenTargeValue();
if (startAfterPause) {
judgeOxygen = m_RunCfg->m_WarnOxygen->GetValue();
}
if (!m_State.m_IsCycleDedust) {
m_Client->SetDedust(true);
g_Toast->AddToast(new ToastBean(_(u8"开启除尘").c_str(), 3000, ImVec4(0, 1, 0, 1)));
Sleep(3000);
}
UpdateShowStat();
time_t debustStartTime;
time(&debustStartTime);
BaseCtrl::SetPreState(BaseCtrl::Dedusting);
count = 0;
bool hasdWait = false;
while (BaseCtrl::IsPrePrint() && BaseCtrl::GetPreState() == BaseCtrl::Dedusting) {
Sleep(500);
UpdateShowStat();
if (!m_State.m_IsCycleDedust) {
if (g_SystemInfo->GetOxygenRealTimeMaxValue() < m_RunCfg->GetOxygenAlarmValue())
{
if (m_State.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(false);
Sleep(1000);
}
m_Client->SetDedust(true);
Sleep(1000);
}
else {
if ((count % 20) == 0) {
if (!m_State.m_IsOneKeyDeoxygen)
{
m_Client->SetOneKeyDeoxygen(true);
Sleep(1000);
}
count = 0;
g_Toast->AddToast(new ToastBean(_(u8"正在等待循环重启").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
continue;
}
}
FanFit* al = m_ExtCfg->m_FanWindFit[m_ExtCfg->m_SelectedFanWindFit];
if (m_State.m_SettingWindSpeed - m_State.m_WindSpeedValue <= al->checkWindOffset) {
if (m_RunCfg->m_DedustWaitTimeEnable->GetValue() && !hasdWait) {
uint64_t readyTime = GetTickCount64();
int waitCount = 0;
while (BaseCtrl::IsPrePrint() && BaseCtrl::GetPreState() == BaseCtrl::Dedusting) {
uint64_t timetemp = GetTickCount64();
if (timetemp - readyTime > (m_RunCfg->m_DedustWaitSecond->GetValue() * 1000)) {
hasdWait = true;
break;
}
if ((waitCount % 30) == 0) {
g_Toast->AddToast(new ToastBean(_(u8"循环等待中").c_str(), 3000, Toast::COLOR_ORANGE));
waitCount = 1;
}
Sleep(300);
waitCount++;
}
}
judgeOxygen = m_RunCfg->m_WarnOxygen->GetValue();
// judgeOxygen = m_RunCfg->GetOxygenTargeValue();
// if (startAfterPause) {
// judgeOxygen = m_RunCfg->m_WarnOxygen;
// }
if (g_SystemInfo->m_ComPrintOxygen1 <= judgeOxygen && g_SystemInfo->m_ComPrintOxygen2 <= judgeOxygen) {
bool canbreak = false;
if (!m_AlarmCfgWrapper->m_PrintSignalAlarm) {
canbreak = true;
}
if (!m_AlarmCfgWrapper->m_PrintSignalAlarm->m_IsEnable) {
canbreak = true;
}
if (!m_AlarmCfgWrapper->m_PrintSignalAlarm->m_IsAlarm) {
canbreak = true;
}
if (canbreak)
{
canbreak = false;
if (!m_AlarmCfgWrapper->m_InverterRunSignalAlarm) {
canbreak = true;
}
if (!m_AlarmCfgWrapper->m_InverterRunSignalAlarm->m_IsEnable) {
canbreak = true;
}
if (!m_AlarmCfgWrapper->m_InverterRunSignalAlarm->m_IsAlarm) {
canbreak = true;
}
if (canbreak) {
break;
}
else {
if ((count % 20) == 0) {
count = 0;
g_Toast->AddToast(new ToastBean(_(u8"正在等待变频器运行信号").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
}
}
else {
if ((count % 20) == 0) {
count = 0;
g_Toast->AddToast(new ToastBean(_(u8"正在等待可打印信号").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
}
}
else {
if ((count % 20) == 0) {
count = 0;
g_Toast->AddToast(new ToastBean(_(u8"正在等待氧含量").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
}
}
else {
if ((count % 20) == 0) {
count = 0;
g_Toast->AddToast(new ToastBean(_(u8"正在等待风速").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
}
}
time_t debustEndTime;
time(&debustEndTime);
//dedusttime = debustEndTime - debustStartTime;
return true;
}
void M1Purifier::UpdateShowStat()
{
m_Client->GetInfo(m_State);
}
void M1Purifier::AutoCtrl()
{
if (m_IsDeoxygenStarted && !m_State.m_IsOneKeyDeoxygen)
{
m_IsDeoxygenStarted = false;
if (!m_HadCalcDeoxygenTime) {
m_LastDeoxygenTime = (GetTickCount64() - m_LastStartDeoxygenTime) / 1000.0f / 60.0f;
m_HadCalcDeoxygenTime = true;
}
}
if (BaseCtrl::IsStart() || m_State.m_IsOneKeyDeoxygen || m_State.m_IsCycleDedust)
{
if (m_State.m_IsBlowback) {
g_Toast->AddToast(new ToastBean(_(u8"存在不运行反吹条件,反吹中断").c_str(), 3000, Toast::COLOR_RED));
m_Client->SetBlowBack(false);
Sleep(500);
}
}
if ((g_SystemInfo->m_ComPrintOxygen1 > m_RunCfg->GetOxygenAlarmValue() || g_SystemInfo->m_ComPrintOxygen2 > m_RunCfg->GetOxygenAlarmValue()) && !m_RunCfg->m_IsDebugMode->GetValue()) {
if (m_State.m_IsCycleDedust) {
g_Toast->AddToast(new ToastBean(_(u8"氧含量越限,中断循环").c_str(), 3000, Toast::COLOR_RED));
m_Client->SetDedust(false);
Sleep(1000);
UpdateShowStat();
}
}
if (!m_ManualCheckAirTightness) {
//关闭补气阀
if (m_State.m_IsOneKeyDeoxygen || m_State.m_IsCycleDedust) {
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);
}
}
g_SystemInfo->m_PurifierCtrlPrintAirEvacuation = m_State.m_IsOneKeyDeoxygen;
//g_SystemInfo->m_PrintAirEvacuationNeedOpen = m_State.m_IsOneKeyDeoxygen;
//m_IOCfgWrapper->m_PrintAirEvacuation->SetActive(m_State.m_IsOneKeyDeoxygen);
}
else {
g_SystemInfo->m_PurifierCtrlPrintAirEvacuation = false;
}
bool isDedustingStopAlarm = !m_State.m_IsCycleDedust;
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_FanFreqWarn && m_AlarmCfgWrapper->m_FanFreqWarn->m_IsEnable) {
if (m_State.m_RealFreq > m_RunCfg->m_FanFreqWarnValue->GetValue()) {
m_AlarmCfgWrapper->m_FanFreqWarn->m_AlarmInfo = to_string(m_State.m_RealFreq);
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_FanFreqWarn, true);
}
else {
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_FanFreqWarn, false);
}
}
SignalState ss;
SignalService::GetInstance().GetSignalState(ss);
if (m_RunCfg->m_PrintAutoRenewalGas->GetValue()) {
if (BaseCtrl::IsStart() && ss.m_PrintAirRenewalEnable) {
if (!ss.m_PrintAirRenewalTrigger) {
SignalService::GetInstance().SetPrintAirRenewalTrigger(true);
}
}
else {
if (ss.m_PrintAirRenewalTrigger) {
SignalService::GetInstance().SetPrintAirRenewalTrigger(false);
if (m_IOCfgWrapper->m_PrintAirRenewalInOutValve && m_IOCfgWrapper->m_PrintAirRenewalInOutValve->IsActive())
{
m_IOCfgWrapper->m_PrintAirRenewalInOutValve->SetActive(false);
}
}
}
}
else {
if (ss.m_PrintAirRenewalTrigger) {
SignalService::GetInstance().SetPrintAirRenewalTrigger(false);
if (m_IOCfgWrapper->m_PrintAirRenewalInOutValve && m_IOCfgWrapper->m_PrintAirRenewalInOutValve->IsActive())
{
m_IOCfgWrapper->m_PrintAirRenewalInOutValve->SetActive(false);
}
}
}
if (m_AlarmCfgWrapper->m_PurifierKeepAliveAlarm)
{
int tick = m_RunCfg->m_PurifierKeepAliveAlarmJudgeSecond->GetValue() * 1000 / m_CycleTick;
if (m_State.m_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.m_KeepAlive;
}
if (m_AlarmCfgWrapper->m_WindOverLimitAlarm) {
if ((m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag > 250) && !m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_Shielding) {
float alarmPercent = m_ExtCfg->m_FanWindFit[m_ExtCfg->m_SelectedFanWindFit]->checkAlarmPercent;
float minAlarm = m_State.m_SettingWindQuantity * (1.0f - alarmPercent / 100.0f);
float maxAlarm = m_State.m_SettingWindQuantity * (1.0f + alarmPercent / 100.0f);
float actV = m_State.m_WindQuantityValue;
if ((actV > maxAlarm || actV < minAlarm)) {
if (m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_AlarmContinueTick > m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_CheckAlarmSetTick) {
m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_AlarmInfo = to_string(actV);
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_WindOverLimitAlarm, true);
}
else {
m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_AlarmContinueTick++;
}
}
else
{
m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_AlarmContinueTick = 0;
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_WindOverLimitAlarm, false);
}
}
else {
m_AlarmCfgWrapper->m_WindOverLimitAlarm->m_AlarmContinueTick = 0;
SignalService::GetInstance().SetAlarm(m_AlarmCfgWrapper->m_WindOverLimitAlarm, false);
}
}
m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag++;
if (m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag > 300)m_AlarmCfgWrapper->m_WindOverLimitJudgeFlag = 300;
CheckInternalAlarm();
}
//void M1Purifier::DrawUI()
//{
// if (g_Admin > USER) {
// DrawAdminUI();
// }
// else DrawUserUI();
//}
double M1Purifier::GetWindValue(double dvalue)
{
return m_State.m_WindSpeedValue;
}
//void M1Purifier::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;
// g_log->TraceInfo(_(u8"更改氮气风速等待差值为:%.2f").c_str(), m_ExtCfg->m_NitrogenFit.checkWindOffset);
// }
// if (ImGui::InputFloat(_(u8"氮气风速越限百分比").c_str(), &m_ExtCfg->m_NitrogenFit.checkAlarmPercent, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue))
// {
// }
// /*if (ImGui::InputFloat(_(u8"氮气风速下限").c_str(), &m_ExtCfg->m_NitrogenFit.alarmWind, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue))
// {
// if (m_ExtCfg->m_NitrogenFit.alarmWind < 0.0f)m_ExtCfg->m_NitrogenFit.alarmWind = 0.0f;
// if (m_ExtCfg->m_NitrogenFit.alarmWind > m_State.windSetValue)m_ExtCfg->m_NitrogenFit.alarmWind = m_State.windSetValue - 0.1;
// g_log->TraceInfo(_(u8"更改氮气风速下限值为:%.2f").c_str(), m_ExtCfg->m_NitrogenFit.alarmWind);
// }*/
// 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);
// }
// g_log->TraceInfo(_(u8"更改使用气体%d").c_str(), m_ExtCfg->m_SelectedFanWindFit);
// }
//
//
// 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;
// g_log->TraceInfo(_(u8"更改氩气风速等待差值为:%.2f").c_str(), m_ExtCfg->m_ArgonFit.checkWindOffset);
// }
//
// if (ImGui::InputFloat(_(u8"氩气风速越限百分比").c_str(), &m_ExtCfg->m_ArgonFit.checkAlarmPercent, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue))
// {
// }
//
// /*if (ImGui::InputFloat(_(u8"氩气风速下限").c_str(), &m_ExtCfg->m_ArgonFit.alarmWind, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue))
// {
// if (m_ExtCfg->m_ArgonFit.alarmWind < 0.0f)m_ExtCfg->m_ArgonFit.alarmWind = 0.0f;
// if (m_ExtCfg->m_ArgonFit.alarmWind > m_State.windSetValue)m_ExtCfg->m_ArgonFit.alarmWind = m_State.windSetValue - 0.1;
// g_log->TraceInfo(_(u8"更改氩气风速下限值为:%.2f").c_str(), m_ExtCfg->m_ArgonFit.alarmWind);
// }*/
// if (ImGui::Checkbox(_(u8"打印前反吹提示").c_str(), &m_RunCfg->m_BlowBackNotifyBeforePrint))
// {
// g_log->TraceInfo(_(u8"更改打印前反吹提示:%d").c_str(), m_RunCfg->m_BlowBackNotifyBeforePrint);
// }
// if (ImGui::Checkbox(_(u8"打印后自动反吹").c_str(), &m_RunCfg->m_BlowBackNotifyAfterPrint))
// {
// g_log->TraceInfo(_(u8"更改打印后自动反吹:%d").c_str(), m_RunCfg->m_BlowBackNotifyAfterPrint);
// }
// ImGui::EndGroup();
//}
bool M1Purifier::IsConnectAlarm()
{
bool rel = false;
bool isConnect = m_Client->IsServerConnected();
if (isConnect) {
m_ConnectAlarmTick = GetTickCount64();
}
else {
if (m_PreConnectState) {
m_ConnectAlarmTick = GetTickCount64();
}
else {
uint64_t tnow = GetTickCount64();
if (tnow - m_ConnectAlarmTick > 5000) {
rel = true;
}
}
}
m_PreConnectState = isConnect;
return rel;
}
bool M1Purifier::IsWindActive()
{
M1Info stat;
m_Client->GetInfo(stat);
return stat.m_IsCycleDedust;
}
void M1Purifier::SetCoverWind(bool bvalue)
{
if (bvalue)
{
m_Client->SetCoverWindResume(false);
m_Client->SetCoverWindSlow(true);
}
else
{
m_Client->SetCoverWindSlow(false);
m_Client->SetCoverWindResume(true);
m_Client->ResetCoverWindSlowFinish();
m_Client->ResetCoverWindResumeFinish();
}
}
bool M1Purifier::IsCoverWindRecover()
{
bool rel = false;
M1Info stat;
m_Client->GetInfo(stat);
if (m_RunCfg->m_UseCoverWindSignal->GetValue())
{
if (stat.m_CoverWindSlowFinish)
{
rel = true;
}
}
else {
FanFit* al = m_ExtCfg->m_FanWindFit[m_ExtCfg->m_SelectedFanWindFit];
if ((stat.m_SettingWindSpeed - stat.m_WindSpeedValue) < al->checkWindOffset) {
rel = true;
}
}
return rel;
}
bool M1Purifier::IsCoverWindSlow()
{
bool rel = false;
M1Info stat;
m_Client->GetInfo(stat);
if (m_RunCfg->m_UseCoverWindSignal->GetValue())
{
if (stat.m_CoverWindSlowFinish) {
rel = true;
}
}
else {
FanFit* al = m_ExtCfg->m_FanWindFit[m_ExtCfg->m_SelectedFanWindFit];
if ((stat.m_WindSpeedValue - (stat.m_SettingWindSpeed * stat.m_CoverWindDropRate / 100.0f)) < al->checkWindOffset) {
rel = true;
}
}
return rel;
}
void M1Purifier::ResetSlowWind()
{
m_Client->SetCoverWindSlow(false);
m_Client->SetCoverWindResume(false);
}
bool M1Purifier::StartBlowBack(bool wait, int wcont, string toast)
{
bool rel = true;
M1Info stat;
bool noerror = false;
for (unsigned int i = 0; i < m_RunCfg->m_FanFreqAlarmProcMaxTimes->GetValue(); i++) {
m_Client->GetInfo(stat);
if (stat.m_PurifierOxygenValue > stat.m_PurifierDeoxygenTargeValue) {
if (stat.m_IsCycleDedust) {
m_Client->SetDedust(false);
Sleep(3000);
}
m_Client->GetInfo(stat);
if (!stat.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(true);
Sleep(2000);
}
m_Client->GetInfo(stat);
int count = 0;
while (BaseCtrl::GetPauseState() == wcont && stat.m_IsOneKeyDeoxygen) {
if (stat.m_PurifierOxygenValue <= stat.m_PurifierDeoxygenTargeValue) {
m_Client->SetOneKeyDeoxygen(false);
Sleep(8000);
break;
}
Sleep(1000);
if ((count % 20) == 0) {
g_Toast->AddToast(new ToastBean(_(u8"正在等待净化器氧含量到达目标值").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
if (count > 100000)count = 0;
m_Client->GetInfo(stat);
}
}
if (BaseCtrl::GetPauseState() != wcont)break;
m_Client->SetBlowBack(true);
if (wait) {
Sleep(5000);
int count = 0;
while (BaseCtrl::GetPauseState() == wcont) {
UpdateShowStat();
if (!m_State.m_IsBlowback)
{
break;
}
Sleep(500);
if (!toast.empty()) {
if ((count % 20) == 0) {
g_Toast->AddToast(new ToastBean(toast, 3000, Toast::COLOR_ORANGE));
}
count++;
if (count > 100000)count = 0;
}
}
}
m_Client->GetInfo(stat);
if (stat.m_IsBlowback)
{
m_Client->SetBlowBack(false);
Sleep(5000);
}
if (BaseCtrl::GetPauseState() != wcont)break;
if (g_SystemInfo->GetOxygenRealTimeMinValue() > m_RunCfg->m_WarnOxygen->GetValue()) {
m_Client->GetInfo(stat);
if (stat.m_IsCycleDedust) {
m_Client->SetDedust(false);
Sleep(3000);
}
m_Client->GetInfo(stat);
if (!stat.m_IsOneKeyDeoxygen) {
m_Client->SetOneKeyDeoxygen(true);
Sleep(2000);
}
m_Client->GetInfo(stat);
int count = 0;
while (BaseCtrl::GetPauseState() == wcont && stat.m_IsOneKeyDeoxygen) {
if (g_SystemInfo->GetOxygenRealTimeMaxValue() < m_RunCfg->m_TargeOxygen->GetValue()) {
m_Client->SetOneKeyDeoxygen(false);
Sleep(3000);
break;
}
Sleep(1000);
if ((count % 20) == 0) {
g_Toast->AddToast(new ToastBean(_(u8"正在等待氧含量到达目标值").c_str(), 3000, Toast::COLOR_ORANGE));
}
count++;
if (count > 100000)count = 0;
m_Client->GetInfo(stat);
}
}
m_Client->GetInfo(stat);
if (!stat.m_IsCycleDedust) {
m_Client->SetDedust(true);
Sleep(3000);
}
m_Client->GetInfo(stat);
int count = 0;
while (BaseCtrl::GetPauseState() == wcont && stat.m_IsCycleDedust) {
count++;
if (count > 60) {
break;
}
Sleep(1000);
m_Client->GetInfo(stat);
}
m_Client->GetInfo(stat);
if (stat.m_IsCycleDedust) {
if (stat.m_RealFreq <= m_RunCfg->m_FanFreqAlarmValue->GetValue()) {
m_Client->SetDedust(false);
rel = true;
break;
}
else {
rel = false;
}
}
m_Client->GetInfo(stat);
if (stat.m_IsCycleDedust) {
m_Client->SetDedust(false);
Sleep(3000);
}
}
return rel;
}
void M1Purifier::ResetSlwoWindSignal(bool precover)
{
if (precover)
{
m_Client->SetCoverWindSlow(false);
//m_Client->ResetCoverWindSlowFinish();
}
else {
m_Client->SetCoverWindResume(false);
//m_Client->ResetCoverWindResumeFinish();
}
}
//void M1Purifier::DrawFinishReportRel()
//{
// ImGui::Dummy(ImVec2(0, 10));
// 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));
//}
string M1Purifier::GetFinishPrintBlowbackInfo()
{
string str = u8"Unknow";
switch (m_FinishPrintBlowbackStep)
{
case Forbid: {
str = _(u8"反吹条件不满足").c_str();
}break;
case Ready: {
str = _(u8"准备中").c_str();
}break;
case Deoxygen: {
str = _(u8"净化器内部除氧").c_str();
}break;
case Blowback: {
str = _(u8"反吹中").c_str();
}break;
case Finished: {
str = _(u8"已完成").c_str();
}break;
default:
break;
}
return str;
}
int M1Purifier::GetFilterUseTime()
{
M1Info stat;
m_Client->GetInfo(stat);
return stat.m_AftBlowbackFilterUseTime;
}
void M1Purifier::CheckInternalAlarm()
{
if (!m_AlarmCfgWrapper->m_PurifierInternalAlarm)return;
bool hasAlarm = false;
stringstream ss;
if (m_State.m_MidTempOverLimitAlarm)
{
ss << _(u8"中效高温报警").c_str() << "\n";
hasAlarm = true;
}
if (m_State.m_MidHighTempOverLimitAlarm)
{
ss << _(u8"中效超高温报警").c_str() << "\n";
hasAlarm = true;
}
if (m_State.m_CompressedGasPressureLowAlarm)
{
ss << _(u8"压缩气过低报警").c_str() << "\n";
hasAlarm = true;
}
if (m_State.m_InverterAlarm)
{
ss << _(u8"变频器报警").c_str() << "\n";
hasAlarm = true;
}
if (m_State.m_CycleInValveOpenAlarm)
{
ss << _(u8"循环进气阀打开异常").c_str() << "\n";
hasAlarm = true;
}
if (m_State.m_CycleOutValueOpenAlarm)
{
ss << _(u8"循环出气阀打开异常").c_str() << "\n";
hasAlarm = true;
}
if (hasAlarm)
{
m_AlarmCfgWrapper->m_PurifierInternalAlarm->m_AlarmInfo = ss.str().c_str();
m_AlarmCfgWrapper->m_PurifierInternalAlarm->m_IsAlarm = true;
}
else {
m_AlarmCfgWrapper->m_PurifierInternalAlarm->m_AlarmInfo = "";
m_AlarmCfgWrapper->m_PurifierInternalAlarm->m_IsAlarm = false;
}
}
//void M1Purifier::DrawUserUI()
//{
// M1Info info;
// m_Client->GetInfo(info);
//
// ImGui::Begin(_(u8"净化器").c_str(), &m_PurifierWinShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking);
// 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 (info.m_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("%s", info.m_ShowCode.c_str());
// ImGui::Text(_(u8"中效压力值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_MidPressureValue);
//
// ImGui::Text(_(u8"滤芯压差值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_FilterDifValue);
//
// ImGui::Text(_(u8"中效温度值:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f ℃", info.m_MidTemperatureValue);
//
// ImGui::Text(_(u8"打印室压力:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_PrintPressure);
//
// ImGui::Text(_(u8"工作气压力:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Mpa", info.m_WorkGasPressureValue);
//
// ImGui::Text(_(u8"压缩气压力:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Mpa", info.m_CompressedGasPressureValue);
//
// ImGui::Text(_(u8"反吹气包压力:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Mpa", info.m_BlowbackAirPocketPressureValue);
//
//
// ImGui::Text(_(u8"尾气压差:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_OffgasDifPressureValue);
//
// ImGui::Text(_(u8"废粉桶粉量高度:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f mm", info.m_WastePowderBucketPowderHigh);
//
// ImGui::Text(_(u8"惰化剂重量:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f kg", info.m_InertingAgentWeight);
//
//
// ImGui::Text(_(u8"风机频率预警值:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f Hz", m_RunCfg->m_FanFreqWarnValue);
// ImGui::Text(_(u8"风机频率报警值:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f Hz", m_RunCfg->m_FanFreqAlarmValue);
//
// ImGui::Text(_(u8"频率报警反吹最大次数:").c_str()); ImGui::SameLine();
// ImGui::Text("%u", m_RunCfg->m_FanFreqAlarmProcMaxTimes);
//
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
// ImGui::Checkbox(_(u8"铺粉减风速启动").c_str(), &info.m_CoverWindSlowStartup);
// ImGui::Checkbox(_(u8"铺粉减风速完成").c_str(), &info.m_CoverWindSlowFinish);
// ImGui::Checkbox(_(u8"铺粉风速恢复启动").c_str(), &info.m_CoverWindResumeStartup);
// ImGui::Checkbox(_(u8"铺粉风速恢复完成").c_str(), &info.m_CoverWindResumeFinish);
// ImGui::PopItemFlag();
//
// ImGui::Text(_(u8"铺粉风速比率:").c_str()); ImGui::SameLine();
// ImGui::PushID("coverWindSpeedOffset");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.coverWindSpeedOffset = info.m_CoverWindDropRate;
// if (ImGui::InputFloatEx(u8"%", &m_ShowAssist.coverWindSpeedOffset, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetCoverWindDropRate(m_ShowAssist.coverWindSpeedOffset);
// g_log->TraceInfo(_(u8"更改铺粉变风速比率:%.2f").c_str(), m_ShowAssist.coverWindSpeedOffset);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
// ImGui::Checkbox(_(u8"打印换气").c_str(), &m_RunCfg->m_PrintAutoRenewalGas);
//
// ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
// ImGui::Checkbox(_(u8"循环等待").c_str(), &m_RunCfg->m_DedustWaitTimeEnable);
// ImGui::Text(_(u8"循环等待秒数").c_str()); ImGui::SameLine();
// ImGui::Text("%u min", m_RunCfg->m_DedustWaitSecond);
// ImGui::PopItemFlag();
//
// ImGui::Text(_(u8"心跳:%d").c_str(), info.m_KeepAlive);
//
//
// 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 m/s", info.m_WindSpeedValue);
//
// ImGui::Text(_(u8"当前风量:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f M³/H", info.m_WindQuantityValue);
//
// ImGui::Text(_(u8"实际频率:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f Hz", info.m_RealFreq);
//
// ImGui::Text(_(u8"理论频率:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f Hz", info.m_TheoryFreq);
//
// ImGui::Text(_(u8"净化器氧含量:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f %%", info.m_PurifierOxygenValue);
//
// ImGui::Text(_(u8"打印室氧含量:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f PPM", info.m_PrintRoomOxygenValue);
//
// ImGui::Text(_(u8"净化箱使用时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_PuriferUseTime);
//
// ImGui::Text(_(u8"滤芯使用总时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_FilterUseTime);
//
// ImGui::Text(_(u8"反吹后滤芯使用时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_AftBlowbackFilterUseTime);
//
// ImGui::Text(_(u8"旋风料斗使用时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_HopperUseTime);
//
//
// ImGui::Text(_(u8"净化箱泄压值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_PuriferPressureReleaseValue);
//
// ImGui::Text(_(u8"滤芯堵塞值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_FilterBlockValue);
//
// ImGui::Text(_(u8"设定风速:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f m/s", info.m_SettingWindSpeed);
//
// ImGui::Text(_(u8"设定风量:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f M³/h", info.m_SettingWindQuantity);
//
// ImGui::Text(_(u8"净化箱除氧目标值:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f %%", info.m_PurifierDeoxygenTargeValue);
//
// ImGui::Text(_(u8"滤芯氧含量报警值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f %%", m_RunCfg->m_FilterOxygenAlarmValue);
//
// ImGui::Text(_(u8"打印室除氧目标值:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f PPM", info.m_PrintRoomDeoxygenTargeValue);
//
// ImGui::Text(_(u8"打印室除氧预警值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f PPM", info.m_PrintRoomDeoxygenWarnValue);
//
// ImGui::Text(_(u8"打印室除氧报警值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f PPM", info.m_PrintRoomDeoxygenAlarmValue);
//
// ImGui::Text(_(u8"打印室压力下限:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_PrintRoomPressureDownLimit);
//
// ImGui::Text(_(u8"打印室压力上限:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_PrintRoomPressureUpLimit);
//
// ImGui::Text(_(u8"反吹次数:").c_str()); ImGui::SameLine();
// ImGui::Text("%u", info.m_BlowbackTimes);
//
// ImGui::Text(_(u8"滤芯反吹提示时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_FilterBlowbackNotifyTime);
//
// ImGui::Text(_(u8"尾气泄压值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_OffgasPressureReleaseValue);
//
// ImGui::Text(_(u8"尾气滤芯堵塞值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_OffgasFilterBlockValue);
//
// ImGui::Text(_(u8"打印室除氧时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u min", info.m_PrintRoomDeoxygenTime);
//
// ImGui::Text(_(u8"净化器除氧时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u min", info.m_PurifireDeoxygenTime);
//
//
// ImGui::EndGroup();
// ImGui::SameLine(0, 20);
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
// ImGui::SameLine();
//
// ImGui::BeginGroup();
// ImGui::Text(_(u8"保压测试失败").c_str()); ImGui::SameLine();
// if (info.m_ProtectionTestFail)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 (info.m_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 (info.m_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 (info.m_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 (info.m_InertingValveOpenAlarm)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 (info.m_InertingValveCloseAlarm)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 (info.m_InertingValveMidPos)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 (info.m_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 (info.m_UselessPowderValveOpenAlarm)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 (info.m_UselessPowderValveCloseAlarm)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 (info.m_UselessPowderValveMidPos)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 (info.m_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 (info.m_CycleInValveCloseAlarm)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 (info.m_CycleInValveMidPos)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 (info.m_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 (info.m_CycleOutValueCloseAlarm)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 (info.m_CycleOutValueMidPos)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 (info.m_WorkGasPressureLowAlarm)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 (info.m_CompressedGasPressureLowAlarm)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 (info.m_StandbyStateExceptionAlarm)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 (info.m_InertingExhaustValveOpenAlarm)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 (info.m_InertingExhaustValveCloseAlarm)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 (info.m_InertingExhaustValveMidPos)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 (info.m_CyclonePowderValveOpenAlarm)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 (info.m_CyclonePowderValveCloseAlarm)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 (info.m_CyclonePowderValveMidPos)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::EndGroup();
// ImGui::SameLine(0, 20);
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
// ImGui::SameLine();
//
// ImGui::BeginGroup();
// ImGui::Text(_(u8"废粉桶需要清理").c_str()); ImGui::SameLine();
// if (info.m_WastePowderBucketNeedClean)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 (info.m_WastePowderBucketSetupException)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 (info.m_InertingAgentNeeedFill)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 (info.m_AnemometerExceptionAlarm)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 (info.m_HopperNeedClean)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 (info.m_FilterNeedBlowback)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 (info.m_InertizerSafetyLockSetupException)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::EndGroup();
// ImGui::SameLine(0, 20);
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
// ImGui::SameLine();
//
//
// ImGui::BeginGroup();
//
// ImGui::Text(_(u8"在一键除氧:").c_str()); ImGui::SameLine();
// if (info.m_IsOneKeyDeoxygen)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 (info.m_IsPuriferDeoxygen)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 (info.m_IsPrintMachinieDeoxygen)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 (info.m_IsCycleDedust)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 (info.m_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 (info.m_IsPowderJarClean)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 (info.m_IsHopperClean)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 (info.m_IsAddInertingAgent)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 (info.m_IsPurifierRequestBlowback)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 (info.m_IsPurifierBlowbackFinish)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(), info.m_IsOneKeyDeoxygen))
// {
// m_Client->SetOneKeyDeoxygen(!info.m_IsOneKeyDeoxygen);
// g_log->TraceInfo(_(u8"更改远程一键清洗:%d").c_str(), !info.m_IsOneKeyDeoxygen);
// }
// ImGui::SameLine();
// ImGui::Text(_(u8"一键除氧").c_str());
//
// ImGui::Dummy(ImVec2(0, 10));
// if (ImGui::ToggleButton(_(u8"循环除尘").c_str(), info.m_IsCycleDedust))
// {
// if (!info.m_IsCycleDedust) {
// if ((g_SystemInfo->GetOxygenRealTimeMinValue() > m_RunCfg->GetOxygenAlarmValue())) {
// g_Toast->AddToast(new ToastBean(_(u8"氧含量高于报警值,不能执行循环").c_str(), 3000, Toast::COLOR_RED));
// }
// else {
// m_Client->SetDedust(!info.m_IsCycleDedust);
// g_log->TraceInfo(_(u8"更改远程除尘:%d").c_str(), !info.m_IsCycleDedust);
// }
// }
// else {
// m_Client->SetDedust(!info.m_IsCycleDedust);
// g_log->TraceInfo(_(u8"更改远程除尘:%d").c_str(), !info.m_IsCycleDedust);
// }
// }
// ImGui::SameLine();
// ImGui::Text(_(u8"循环除尘").c_str());
//
// ImGui::Dummy(ImVec2(0, 10));
// if (ImGui::ToggleButton(_(u8"远程反吹").c_str(), info.m_IsBlowback))
// {
// if (!info.m_IsBlowback) {
// if (g_SystemInfo->GetOxygenRealTimeMinValue() > m_RunCfg->GetOxygenAlarmValue()) {
// g_Toast->AddToast(new ToastBean(_(u8"氧含量高于报警值,不能执行反吹").c_str(), 4000, Toast::COLOR_RED));
// }
// else {
// m_Client->SetBlowBack(!info.m_IsBlowback);
// g_log->TraceInfo(_(u8"更改远程反吹:%d").c_str(), !info.m_IsBlowback);
// }
// }
// else {
// m_Client->SetBlowBack(!info.m_IsBlowback);
// g_log->TraceInfo(_(u8"更改远程反吹:%d").c_str(), !info.m_IsBlowback);
// }
// }
// ImGui::SameLine();
// ImGui::Text(_(u8"远程反吹").c_str());
//
// ImGui::Dummy(ImVec2(0, 10));
// if (ImGui::ToggleButton(_(u8"打印室除氧").c_str(), info.m_IsPrintMachinieDeoxygen))
// {
// m_Client->SetPrintRoomDeoxygen(!info.m_IsPrintMachinieDeoxygen);
// g_log->TraceInfo(_(u8"更改打印室除氧:%d").c_str(), !info.m_IsPrintMachinieDeoxygen);
// }
// ImGui::SameLine();
// ImGui::Text(_(u8"打印室除氧").c_str());
//
// ImGui::Dummy(ImVec2(0, 10));
// if (ImGui::ToggleButton(_(u8"净化器除氧").c_str(), info.m_IsPuriferDeoxygen))
// {
// m_Client->SetPurifierDeoxygen(!info.m_IsPuriferDeoxygen);
// g_log->TraceInfo(_(u8"更改净化器除氧:%d").c_str(), !info.m_IsPuriferDeoxygen);
// }
// 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 M1Purifier::DrawAdminUI()
//{
// M1Info info;
// m_Client->GetInfo(info);
//
// ImGui::Begin(_(u8"净化器").c_str(), &m_PurifierWinShow, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking);
// 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 (info.m_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("%s", info.m_ShowCode.c_str());
// ImGui::Text(_(u8"中效压力值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_MidPressureValue);
//
// ImGui::Text(_(u8"滤芯压差值:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_FilterDifValue);
//
// ImGui::Text(_(u8"中效温度值:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f ℃", info.m_MidTemperatureValue);
//
// ImGui::Text(_(u8"打印室压力:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_PrintPressure);
//
// ImGui::Text(_(u8"工作气压力:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Mpa", info.m_WorkGasPressureValue);
//
// ImGui::Text(_(u8"压缩气压力:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Mpa", info.m_CompressedGasPressureValue);
//
// ImGui::Text(_(u8"反吹气包压力:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Mpa", info.m_BlowbackAirPocketPressureValue);
//
// ImGui::Text(_(u8"尾气压差:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f Kpa", info.m_OffgasDifPressureValue);
//
// ImGui::Text(_(u8"废粉桶粉量高度:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f mm", info.m_WastePowderBucketPowderHigh);
//
// ImGui::Text(_(u8"惰化剂重量:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f kg", info.m_InertingAgentWeight);
//
// ImGui::Text(_(u8"风机频率预警值:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f Hz", m_RunCfg->m_FanFreqWarnValue);
// ImGui::Text(_(u8"风机频率报警值:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f Hz", m_RunCfg->m_FanFreqAlarmValue);
//
// ImGui::Text(_(u8"频率报警反吹最大次数:").c_str()); ImGui::SameLine();
// ImGui::Text("%u", m_RunCfg->m_FanFreqAlarmProcMaxTimes);
//
// ImGui::Checkbox(_(u8"铺粉减风速启动").c_str(), &info.m_CoverWindSlowStartup);
// ImGui::Checkbox(_(u8"铺粉减风速完成").c_str(), &info.m_CoverWindSlowFinish);
// ImGui::Checkbox(_(u8"铺粉风速恢复启动").c_str(), &info.m_CoverWindResumeStartup);
// ImGui::Checkbox(_(u8"铺粉风速恢复完成").c_str(), &info.m_CoverWindResumeFinish);
//
// ImGui::Text(_(u8"铺粉风速比率:").c_str()); ImGui::SameLine();
// ImGui::PushID("coverWindSpeedOffset");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.coverWindSpeedOffset = info.m_CoverWindDropRate;
// if (ImGui::InputFloatEx(u8"%", &m_ShowAssist.coverWindSpeedOffset, 0, 0, "%.2f", ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetCoverWindDropRate(m_ShowAssist.coverWindSpeedOffset);
// g_log->TraceInfo(_(u8"更改铺粉变风速比率:%.2f").c_str(), m_ShowAssist.coverWindSpeedOffset);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
//
//
// ImGui::Text(_(u8"打印室除氧时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u min", info.m_PrintRoomDeoxygenTime);
//
// ImGui::Text(_(u8"净化器除氧时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u min", info.m_PurifireDeoxygenTime);
//
// ImGui::Text(_(u8"心跳:%d").c_str(), info.m_KeepAlive);
//
//
// ImGui::EndGroup();
// ImGui::SameLine(0, 20);
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
// ImGui::SameLine();
//
// ImGui::BeginGroup();
// ImGui::Text(_(u8"当前风速:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f m/s", info.m_WindSpeedValue);
//
// ImGui::Text(_(u8"当前风量:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f M³/H", info.m_WindQuantityValue);
//
// ImGui::Text(_(u8"实际频率:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f Hz", info.m_RealFreq);
//
// ImGui::Text(_(u8"理论频率:").c_str()); ImGui::SameLine();
// ImGui::Text(u8"%.2f Hz", info.m_TheoryFreq);
//
// ImGui::Text(_(u8"净化器氧含量:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f %%", info.m_PurifierOxygenValue);
//
// ImGui::Text(_(u8"打印室氧含量:").c_str()); ImGui::SameLine();
// ImGui::Text("%.2f PPM", info.m_PrintRoomOxygenValue);
//
// ImGui::Text(_(u8"净化箱使用时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_PuriferUseTime);
//
// ImGui::Text(_(u8"滤芯使用总时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_FilterUseTime);
//
// ImGui::Text(_(u8"反吹后滤芯使用时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_AftBlowbackFilterUseTime);
//
// ImGui::Text(_(u8"旋风料斗使用时间:").c_str()); ImGui::SameLine();
// ImGui::Text("%u h", info.m_HopperUseTime);
//
// ImGui::Text(_(u8"净化箱泄压值:").c_str()); ImGui::SameLine();
// ImGui::PushID("PuriferPressureReleaseValue");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_PuriferPressureReleaseValue = info.m_PuriferPressureReleaseValue;
// if (ImGui::InputFloatEx(u8"Kpa", &m_ShowAssist.m_PuriferPressureReleaseValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetPuriferPressureReleaseValue(m_ShowAssist.m_PuriferPressureReleaseValue);
// g_log->TraceInfo(_(u8"更改净化箱泄压值:%.2f").c_str(), m_ShowAssist.m_PuriferPressureReleaseValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"滤芯堵塞值:").c_str()); ImGui::SameLine();
// ImGui::PushID("FilterBlockValue");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_FilterBlockValue = info.m_FilterBlockValue;
// if (ImGui::InputFloatEx(u8"Kpa", &m_ShowAssist.m_FilterBlockValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetFilterBlockValue(m_ShowAssist.m_FilterBlockValue);
// g_log->TraceInfo(_(u8"更改滤芯堵塞值:%.2f").c_str(), m_ShowAssist.m_FilterBlockValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"设定风速:").c_str()); ImGui::SameLine();
// ImGui::PushID("SettingWindSpeed");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_SettingWindSpeed = info.m_SettingWindSpeed;
// if (ImGui::InputFloatEx(u8"m/s", &m_ShowAssist.m_SettingWindSpeed, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetSettingWindSpeed(m_ShowAssist.m_SettingWindSpeed);
// g_log->TraceInfo(_(u8"更改设定风速:%.2f").c_str(), m_ShowAssist.m_SettingWindSpeed);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
//
// ImGui::Text(_(u8"设定风量:").c_str()); ImGui::SameLine();
// ImGui::PushID("SettingWindQuantity");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_SettingWindQuantity = info.m_SettingWindQuantity;
// if (ImGui::InputFloatEx(u8"M³/h", &m_ShowAssist.m_SettingWindQuantity, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetSettingWindQuantity(m_ShowAssist.m_SettingWindQuantity);
// g_log->TraceInfo(_(u8"更改设定风量:%.2f").c_str(), m_ShowAssist.m_SettingWindQuantity);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"净化箱除氧目标值:").c_str()); ImGui::SameLine();
// ImGui::PushID("PurifierDeoxygenTargeValue");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_PurifierDeoxygenTargeValue = info.m_PurifierDeoxygenTargeValue;
// if (ImGui::InputFloatEx(u8"%", &m_ShowAssist.m_PurifierDeoxygenTargeValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetPurifierDeoxygenTargeValue(m_ShowAssist.m_PurifierDeoxygenTargeValue);
// g_log->TraceInfo(_(u8"更改净化箱除氧目标值:%.2f").c_str(), m_ShowAssist.m_PurifierDeoxygenTargeValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"滤芯氧含量报警值:").c_str()); ImGui::SameLine();
// ImGui::PushID("FilterOxygenAlarmValue");
// ImGui::PushItemWidth(inputWidth);
// if (ImGui::InputFloatEx(u8"%", &m_RunCfg->m_FilterOxygenAlarmValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// g_log->TraceInfo(_(u8"更改滤芯氧含量报警值:%.2f").c_str(), m_RunCfg->m_FilterOxygenAlarmValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"打印室除氧目标值:").c_str()); ImGui::SameLine();
// ImGui::PushID("PrintRoomDeoxygenTargeValue");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_PrintRoomDeoxygenTargeValue = info.m_PrintRoomDeoxygenTargeValue;
// if (ImGui::InputFloatEx(u8"PPM", &m_ShowAssist.m_PrintRoomDeoxygenTargeValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetPrintRoomDeoxygenTargeValue(m_ShowAssist.m_PrintRoomDeoxygenTargeValue);
// g_log->TraceInfo(_(u8"更改打印室除氧目标值:%.2f").c_str(), m_ShowAssist.m_PrintRoomDeoxygenTargeValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"打印室除氧预警值:").c_str()); ImGui::SameLine();
// ImGui::PushID("PrintRoomDeoxygenWarnValue");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_PrintRoomDeoxygenWarnValue = info.m_PrintRoomDeoxygenWarnValue;
// if (ImGui::InputFloatEx(u8"PPM", &m_ShowAssist.m_PrintRoomDeoxygenWarnValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetPrintRoomDeoxygenWarnValue(m_ShowAssist.m_PrintRoomDeoxygenWarnValue);
// g_log->TraceInfo(_(u8"更改打印室除氧预警值:%.2f").c_str(), m_ShowAssist.m_PrintRoomDeoxygenWarnValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"打印室除氧报警值:").c_str()); ImGui::SameLine();
// ImGui::PushID("PrintRoomDeoxygenAlarmValue");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_PrintRoomDeoxygenAlarmValue = info.m_PrintRoomDeoxygenAlarmValue;
// if (ImGui::InputFloatEx(u8"PPM", &m_ShowAssist.m_PrintRoomDeoxygenAlarmValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetPrintRoomDeoxygenAlarmValue(m_ShowAssist.m_PrintRoomDeoxygenAlarmValue);
// g_log->TraceInfo(_(u8"更改打印室除氧报警值:%.2f").c_str(), m_ShowAssist.m_PrintRoomDeoxygenAlarmValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"打印室压力下限:").c_str()); ImGui::SameLine();
// ImGui::PushID("PrintRoomPressureDownLimit");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_PrintRoomPressureDownLimit = info.m_PrintRoomPressureDownLimit;
// if (ImGui::InputFloatEx(u8"Kpa", &m_ShowAssist.m_PrintRoomPressureDownLimit, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetPrintRoomPressureDownLimit(m_ShowAssist.m_PrintRoomPressureDownLimit);
// g_log->TraceInfo(_(u8"更改打印室压力下限:%.2f").c_str(), m_ShowAssist.m_PrintRoomPressureDownLimit);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"打印室压力上限:").c_str()); ImGui::SameLine();
// ImGui::PushID("PrintRoomPressureUpLimit");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_PrintRoomPressureUpLimit = info.m_PrintRoomPressureUpLimit;
// if (ImGui::InputFloatEx(u8"Kpa", &m_ShowAssist.m_PrintRoomPressureUpLimit, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetPrintRoomPressureUpLimit(m_ShowAssist.m_PrintRoomPressureUpLimit);
// g_log->TraceInfo(_(u8"更改打印室压力上限:%.2f").c_str(), m_ShowAssist.m_PrintRoomPressureUpLimit);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"反吹次数:").c_str()); ImGui::SameLine();
// ImGui::PushID("BlowbackTimes");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_BlowbackTimes = info.m_BlowbackTimes;
// if (ImGui::InputScalar(u8"", ImGuiDataType_U16, &m_ShowAssist.m_BlowbackTimes, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetBlowbackTimes(m_ShowAssist.m_BlowbackTimes);
// g_log->TraceInfo(_(u8"更改反吹次数:%u").c_str(), m_ShowAssist.m_BlowbackTimes);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"滤芯反吹提示时间:").c_str()); ImGui::SameLine();
// ImGui::PushID("FilterBlowbackNotifyTime");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_FilterBlowbackNotifyTime = info.m_FilterBlowbackNotifyTime;
// if (ImGui::InputScalar(u8"h", ImGuiDataType_U16, &m_ShowAssist.m_FilterBlowbackNotifyTime, 0, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetFilterBlowbackNotifyTime(m_ShowAssist.m_FilterBlowbackNotifyTime);
// g_log->TraceInfo(_(u8"更改滤芯反吹提示时间:%u").c_str(), m_ShowAssist.m_FilterBlowbackNotifyTime);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"尾气泄压值:").c_str()); ImGui::SameLine();
// ImGui::PushID("OffgasPressureReleaseValue");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_OffgasPressureReleaseValue = info.m_OffgasPressureReleaseValue;
// if (ImGui::InputFloatEx(u8"Kpa", &m_ShowAssist.m_OffgasPressureReleaseValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetOffgasPressureReleaseValue(m_ShowAssist.m_OffgasPressureReleaseValue);
// g_log->TraceInfo(_(u8"更改尾气泄压值:%.2f").c_str(), m_ShowAssist.m_OffgasPressureReleaseValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
// ImGui::Text(_(u8"尾气滤芯堵塞值:").c_str()); ImGui::SameLine();
// ImGui::PushID("OffgasFilterBlockValue");
// ImGui::PushItemWidth(inputWidth);
// m_ShowAssist.m_OffgasFilterBlockValue = info.m_OffgasFilterBlockValue;
// if (ImGui::InputFloatEx(u8"Kpa", &m_ShowAssist.m_OffgasFilterBlockValue, 0, 0, 2, ImGuiInputTextFlags_EnterReturnsTrue)) {
// m_Client->SetOffgasFilterBlockValue(m_ShowAssist.m_OffgasFilterBlockValue);
// g_log->TraceInfo(_(u8"更改尾气滤芯堵塞值:%.2f").c_str(), m_ShowAssist.m_OffgasFilterBlockValue);
// }
// ImGui::PopItemWidth();
// ImGui::PopID();
//
//
//
// ImGui::EndGroup();
// ImGui::SameLine(0, 20);
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
// ImGui::SameLine();
//
// ImGui::BeginGroup();
// ImGui::Text(_(u8"保压测试失败").c_str()); ImGui::SameLine();
// if (info.m_ProtectionTestFail)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 (info.m_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 (info.m_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 (info.m_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 (info.m_InertingValveOpenAlarm)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 (info.m_InertingValveCloseAlarm)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 (info.m_InertingValveMidPos)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 (info.m_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 (info.m_UselessPowderValveOpenAlarm)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 (info.m_UselessPowderValveCloseAlarm)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 (info.m_UselessPowderValveMidPos)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 (info.m_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 (info.m_CycleInValveCloseAlarm)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 (info.m_CycleInValveMidPos)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 (info.m_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 (info.m_CycleOutValueCloseAlarm)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 (info.m_CycleOutValueMidPos)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 (info.m_WorkGasPressureLowAlarm)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 (info.m_CompressedGasPressureLowAlarm)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 (info.m_StandbyStateExceptionAlarm)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 (info.m_InertingExhaustValveOpenAlarm)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 (info.m_InertingExhaustValveCloseAlarm)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 (info.m_InertingExhaustValveMidPos)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 (info.m_CyclonePowderValveOpenAlarm)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 (info.m_CyclonePowderValveCloseAlarm)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 (info.m_CyclonePowderValveMidPos)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::EndGroup();
// ImGui::SameLine(0, 20);
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
// ImGui::SameLine();
//
// ImGui::BeginGroup();
// ImGui::Text(_(u8"废粉桶需要清理").c_str()); ImGui::SameLine();
// if (info.m_WastePowderBucketNeedClean)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 (info.m_WastePowderBucketSetupException)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 (info.m_InertingAgentNeeedFill)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 (info.m_AnemometerExceptionAlarm)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 (info.m_HopperNeedClean)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 (info.m_FilterNeedBlowback)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 (info.m_InertizerSafetyLockSetupException)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::EndGroup();
// ImGui::SameLine(0, 20);
// ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
// ImGui::SameLine();
//
// ImGui::BeginGroup();
//
// ImGui::Text(_(u8"在一键除氧:").c_str()); ImGui::SameLine();
// if (info.m_IsOneKeyDeoxygen)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 (info.m_IsPuriferDeoxygen)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 (info.m_IsPrintMachinieDeoxygen)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 (info.m_IsCycleDedust)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 (info.m_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 (info.m_IsPowderJarClean)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 (info.m_IsHopperClean)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 (info.m_IsAddInertingAgent)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 (info.m_IsPurifierRequestBlowback)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 (info.m_IsPurifierBlowbackFinish)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(), info.m_IsOneKeyDeoxygen))
// {
// m_Client->SetOneKeyDeoxygen(!info.m_IsOneKeyDeoxygen);
// g_log->TraceInfo(_(u8"更改远程一键清洗:%d").c_str(), !info.m_IsOneKeyDeoxygen);
// }
// ImGui::SameLine();
// ImGui::Text(_(u8"一键除氧").c_str());
//
// ImGui::Dummy(ImVec2(0, 10));
// if (ImGui::ToggleButton(_(u8"循环除尘").c_str(), info.m_IsCycleDedust))
// {
// if (!info.m_IsCycleDedust) {
// if ((g_SystemInfo->GetOxygenRealTimeMinValue() > m_RunCfg->GetOxygenAlarmValue())) {
// g_Toast->AddToast(new ToastBean(_(u8"氧含量高于报警值,不能执行循环").c_str(), 3000, Toast::COLOR_RED));
// }
// else {
// m_Client->SetDedust(!info.m_IsCycleDedust);
// g_log->TraceInfo(_(u8"更改远程除尘:%d").c_str(), !info.m_IsCycleDedust);
// }
// }
// else {
// m_Client->SetDedust(!info.m_IsCycleDedust);
// g_log->TraceInfo(_(u8"更改远程除尘:%d").c_str(), !info.m_IsCycleDedust);
// }
// }
// ImGui::SameLine();
// ImGui::Text(_(u8"循环除尘").c_str());
//
// ImGui::Dummy(ImVec2(0, 10));
// if (ImGui::ToggleButton(_(u8"远程反吹").c_str(), info.m_IsBlowback))
// {
// if (!info.m_IsBlowback) {
// if (g_SystemInfo->GetOxygenRealTimeMinValue() > m_RunCfg->GetOxygenAlarmValue()) {
// g_Toast->AddToast(new ToastBean(_(u8"氧含量高于报警值,不能执行反吹").c_str(), 4000, Toast::COLOR_RED));
// }
// else {
// m_Client->SetBlowBack(!info.m_IsBlowback);
// g_log->TraceInfo(_(u8"更改远程反吹:%d").c_str(), !info.m_IsBlowback);
// }
// }
// else {
// m_Client->SetBlowBack(!info.m_IsBlowback);
// g_log->TraceInfo(_(u8"更改远程反吹:%d").c_str(), !info.m_IsBlowback);
// }
// }
// ImGui::SameLine();
// ImGui::Text(_(u8"远程反吹").c_str());
//
// ImGui::Dummy(ImVec2(0, 10));
// if (ImGui::ToggleButton(_(u8"打印室除氧").c_str(), info.m_IsPrintMachinieDeoxygen))
// {
// m_Client->SetPrintRoomDeoxygen(!info.m_IsPrintMachinieDeoxygen);
// g_log->TraceInfo(_(u8"更改打印室除氧:%d").c_str(), !info.m_IsPrintMachinieDeoxygen);
// }
// ImGui::SameLine();
// ImGui::Text(_(u8"打印室除氧").c_str());
//
// ImGui::Dummy(ImVec2(0, 10));
// if (ImGui::ToggleButton(_(u8"净化器除氧").c_str(), info.m_IsPuriferDeoxygen))
// {
// m_Client->SetPurifierDeoxygen(!info.m_IsPuriferDeoxygen);
// g_log->TraceInfo(_(u8"更改净化器除氧:%d").c_str(), !info.m_IsPuriferDeoxygen);
// }
// 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();
//}