|
@ -10,7 +10,7 @@ using namespace transmit_disfection_protocol; |
|
|
|
|
|
|
|
|
static void readBoardInfo(int deviceId) { |
|
|
static void readBoardInfo(int deviceId) { |
|
|
ack_read_board_info_data_t ack = CAN_MASTER->readboardinfo(deviceId); |
|
|
ack_read_board_info_data_t ack = CAN_MASTER->readboardinfo(deviceId); |
|
|
ISHOW("boardType :%s(%d)", BoardTypeToString(ack.boardType), ack.boardType); |
|
|
|
|
|
|
|
|
ISHOW("boardType :%s(%d)", BoardTypeId2Str(ack.boardType), ack.boardType); |
|
|
ISHOW("projectId :%s(%d)", ProjectIDToString(ack.projectId), ack.projectId); |
|
|
ISHOW("projectId :%s(%d)", ProjectIDToString(ack.projectId), ack.projectId); |
|
|
ISHOW("protcol_version :%d", ack.protcol_version); |
|
|
ISHOW("protcol_version :%d", ack.protcol_version); |
|
|
ISHOW("software_version :%d", ack.software_version); |
|
|
ISHOW("software_version :%d", ack.software_version); |
|
@ -41,13 +41,17 @@ static void readSysInfo(int deviceId) { |
|
|
void TabBuilder::buildLiquidCtrlBoardTab(ProjID_t projectId) { |
|
|
void TabBuilder::buildLiquidCtrlBoardTab(ProjID_t projectId) { |
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, "液路板"); |
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, "液路板"); |
|
|
{ |
|
|
{ |
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "通用", 2); |
|
|
|
|
|
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "通用", 4); |
|
|
box->newSubButton("读取板卡信息", [this](int argn, const char **args) { readBoardInfo(kFixBoardId_LiquidCtrl); }); |
|
|
box->newSubButton("读取板卡信息", [this](int argn, const char **args) { readBoardInfo(kFixBoardId_LiquidCtrl); }); |
|
|
box->newSubButton("读取系统信息", [this](int argn, const char **args) { readSysInfo(kFixBoardId_LiquidCtrl); }); |
|
|
box->newSubButton("读取系统信息", [this](int argn, const char **args) { readSysInfo(kFixBoardId_LiquidCtrl); }); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "压力传感器总线", 2); |
|
|
|
|
|
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "警报灯", 4); |
|
|
|
|
|
box->newFunc("报警灯控制", {"r", "g", "b", "w"}, //
|
|
|
|
|
|
[this](int argn, const char **args) { CAN_MASTER->warningLightSetState(kFixBoardId_LiquidCtrl, atoi(args[0]), atoi(args[1]), atoi(args[2]), atoi(args[3])); }); |
|
|
|
|
|
} |
|
|
|
|
|
{ |
|
|
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "压力传感器总线", 4); |
|
|
box->newFunc("读数据", {"subid"}, //
|
|
|
box->newFunc("读数据", {"subid"}, //
|
|
|
[this](int argn, const char **args) { |
|
|
[this](int argn, const char **args) { |
|
|
int32_t val = CAN_MASTER->psBusReadData(kFixBoardId_LiquidCtrl, atoi(args[0])); |
|
|
int32_t val = CAN_MASTER->psBusReadData(kFixBoardId_LiquidCtrl, atoi(args[0])); |
|
@ -61,10 +65,25 @@ void TabBuilder::buildLiquidCtrlBoardTab(ProjID_t projectId) { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "水浸", 4); |
|
|
|
|
|
box->newFunc("读取-蒸发桶水浸传感器-状态", {}, //
|
|
|
|
|
|
[this](int argn, const char **args) { |
|
|
|
|
|
int state = CAN_MASTER->evaporationTankWSReadState(kFixBoardId_LiquidCtrl); |
|
|
|
|
|
ISHOW("state:%d", state); |
|
|
|
|
|
}); |
|
|
|
|
|
box->newFunc("读取-设备底部水浸传感器-状态", {}, //
|
|
|
|
|
|
[this](int argn, const char **args) { |
|
|
|
|
|
int state = CAN_MASTER->bottomWSReadState(kFixBoardId_LiquidCtrl); |
|
|
|
|
|
ISHOW("state:%d", state); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
tab->addSpacer(); |
|
|
tab->addSpacer(); |
|
|
} |
|
|
} |
|
|
void TabBuilder::buildLiquidCtrlBoardPumpCtrlTab(ProjID_t projectId) { |
|
|
void TabBuilder::buildLiquidCtrlBoardPumpCtrlTab(ProjID_t projectId) { |
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, "泵机控制(液路板)"); |
|
|
|
|
|
|
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, "液路板-泵机控制"); |
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "泵机控制", 6); |
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "泵机控制", 6); |
|
|
|
|
|
|
|
|
box->newFunc("pumpRotate", {"subid", "rpm"}, [](int argn, const char **args) { //
|
|
|
box->newFunc("pumpRotate", {"subid", "rpm"}, [](int argn, const char **args) { //
|
|
@ -97,12 +116,67 @@ void TabBuilder::buildLiquidCtrlBoardPumpCtrlTab(ProjID_t projectId) { |
|
|
}); |
|
|
}); |
|
|
tab->addSpacer(); |
|
|
tab->addSpacer(); |
|
|
} |
|
|
} |
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
static void buildH2O2Box(ZQVTabPage *tab, ProjID_t projectId, int32_t did) { |
|
|
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "H2O2", 4); |
|
|
|
|
|
|
|
|
|
|
|
box->newFunc("H2O2传感器读取校准日期", {}, [did](int argn, const char **args) { |
|
|
|
|
|
int32_t year, month, day; |
|
|
|
|
|
CAN_MASTER->h2o2SensorReadCalibrationDate(did, &year, &month, &day); |
|
|
|
|
|
ISHOW("year:%d,month:%d,day:%d", year, month, day); |
|
|
|
|
|
}); |
|
|
|
|
|
box->newFunc("H2O2传感器读取IC错误码", {}, [did](int argn, const char **args) { |
|
|
|
|
|
int val = CAN_MASTER->h2o2SensorReadSubIcErrorcode(did); |
|
|
|
|
|
ISHOW("val:%d", val); |
|
|
|
|
|
}); |
|
|
|
|
|
box->newFunc("H2O2传感器读取IC寄存器", {"reg", "num"}, [did](int argn, const char **args) { |
|
|
|
|
|
uint8_t *val = CAN_MASTER->h2o2SensorReadSubIcReg(did, atoi(args[0]), atoi(args[1])); |
|
|
|
|
|
ISHOW("val:%s", zhex2str(val, atoi(args[1]) * 2).c_str()); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void TabBuilder::buildPowerControlBoardTab(ProjID_t projectId) { |
|
|
void TabBuilder::buildPowerControlBoardTab(ProjID_t projectId) { |
|
|
|
|
|
{ |
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, "功率板"); |
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, "功率板"); |
|
|
{ |
|
|
{ |
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "通用", 2); |
|
|
|
|
|
box->newSubButton("读取板卡信息", [this](int argn, const char **args) { readBoardInfo(kFixBoardId_LiquidCtrl); }); |
|
|
|
|
|
box->newSubButton("读取系统信息", [this](int argn, const char **args) { readSysInfo(kFixBoardId_LiquidCtrl); }); |
|
|
|
|
|
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "通用", 4); |
|
|
|
|
|
box->newSubButton("读取板卡信息", [this](int argn, const char **args) { readBoardInfo(kFixBoardId_PowerControl); }); |
|
|
|
|
|
box->newSubButton("读取系统信息", [this](int argn, const char **args) { readSysInfo(kFixBoardId_PowerControl); }); |
|
|
|
|
|
} |
|
|
|
|
|
{ |
|
|
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "控制", 4); |
|
|
|
|
|
|
|
|
|
|
|
box->newFunc("风机控制", {"power"}, [this](int argn, const char **args) { CAN_MASTER->blowerCtrl(kFixBoardId_PowerControl, atoi(args[0])); }); |
|
|
|
|
|
box->newFunc("风机安全阀控制", {"valve_state"}, [this](int argn, const char **args) { CAN_MASTER->blowerCtrlSafeValve(kFixBoardId_PowerControl, atoi(args[0])); }); |
|
|
|
|
|
box->newFunc("风机读取电流", {}, [this](int argn, const char **args) { |
|
|
|
|
|
int val = CAN_MASTER->blowerReadElectricCurrent(kFixBoardId_PowerControl); |
|
|
|
|
|
ISHOW("val:%d", val); |
|
|
|
|
|
}); |
|
|
|
|
|
box->newFunc("空压机控制", {"power"}, [this](int argn, const char **args) { CAN_MASTER->airCompressorCtrl(kFixBoardId_PowerControl, atoi(args[0])); }); |
|
|
|
|
|
box->newFunc("空压机安全阀控制", {"valve_state"}, [this](int argn, const char **args) { CAN_MASTER->airCompressorCtrlSafeValve(kFixBoardId_PowerControl, atoi(args[0])); }); |
|
|
|
|
|
box->newFunc("空压机读取电流", {}, [this](int argn, const char **args) { |
|
|
|
|
|
int val = CAN_MASTER->airCompressorReadElectricCurrent(kFixBoardId_PowerControl); |
|
|
|
|
|
ISHOW("val:%d", val); |
|
|
|
|
|
}); |
|
|
|
|
|
box->newFunc("加热器控制", {"power"}, [this](int argn, const char **args) { CAN_MASTER->heaterCtrl(kFixBoardId_PowerControl, atoi(args[0])); }); |
|
|
|
|
|
box->newFunc("加热器安全阀控制", {"valve_state"}, [this](int argn, const char **args) { CAN_MASTER->heaterCtrlSafeValve(kFixBoardId_PowerControl, atoi(args[0])); }); |
|
|
|
|
|
box->newFunc("加热器读取电流", {}, [this](int argn, const char **args) { |
|
|
|
|
|
int val = CAN_MASTER->heaterReadElectricCurrent(kFixBoardId_PowerControl); |
|
|
|
|
|
ISHOW("val:%d", val); |
|
|
|
|
|
}); |
|
|
|
|
|
box->newFunc("加热器读取温度数据", {}, [this](int argn, const char **args) { |
|
|
|
|
|
int val = CAN_MASTER->heaterReadTemperatureData(kFixBoardId_PowerControl); |
|
|
|
|
|
ISHOW("val:%d", val); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
tab->addSpacer(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, "功率板-H2O2"); |
|
|
|
|
|
buildH2O2Box(tab, projectId, kFixBoardId_PowerControl); |
|
|
tab->addSpacer(); |
|
|
tab->addSpacer(); |
|
|
} |
|
|
} |
|
|
|
|
|
} |