|
|
@ -25,9 +25,10 @@ static void readSysInfo(int deviceId) { |
|
|
|
task[i] = CAN_MASTER->readtaskinfo(deviceId, i); |
|
|
|
} |
|
|
|
ISHOW("=========================== sys info ==========================="); |
|
|
|
ISHOW("total_heap_size :%d", ack.total_heap_size); |
|
|
|
ISHOW("free_heap_size :%d", ack.free_heap_size); |
|
|
|
ISHOW("sysHasRun :%d", ack.sysHasRun); |
|
|
|
ISHOW("total_heap_size :%d", ack.total_heap_size); |
|
|
|
ISHOW("free_heap_size :%d", ack.free_heap_size); |
|
|
|
ISHOW("free_sys_heap_size :%d", ack.free_sys_heap_size); |
|
|
|
ISHOW("sysHasRun :%d", ack.sysHasRun); |
|
|
|
ISHOW("="); |
|
|
|
|
|
|
|
ISHOW("=========================== task info ==========================="); |
|
|
@ -38,135 +39,10 @@ static void readSysInfo(int deviceId) { |
|
|
|
ISHOW("="); |
|
|
|
} |
|
|
|
|
|
|
|
// void TabBuilder::buildLiquidCtrlBoardTab(ProjID_t projectId) {
|
|
|
|
// ZQVTabPage *tab = new ZQVTabPage(fathertab, "液路板");
|
|
|
|
// {
|
|
|
|
// 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) { readSysInfo(kFixBoardId_LiquidCtrl); });
|
|
|
|
// }
|
|
|
|
// {
|
|
|
|
// 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"}, //
|
|
|
|
// [this](int argn, const char **args) {
|
|
|
|
// int32_t val = CAN_MASTER->psBusReadData(kFixBoardId_LiquidCtrl, atoi(args[0]));
|
|
|
|
// ISHOW("val:%d", val);
|
|
|
|
// });
|
|
|
|
|
|
|
|
// box->newSubButton("扫描", [this](int argn, const char **args) {
|
|
|
|
// auto result = CAN_MASTER->psBusScan(kFixBoardId_LiquidCtrl);
|
|
|
|
// for (int i = 0; i < result.numOnlineId; i++) {
|
|
|
|
// ISHOW("%d", result.onlineId);
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
// {
|
|
|
|
// 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();
|
|
|
|
// }
|
|
|
|
// void TabBuilder::buildLiquidCtrlBoardPumpCtrlTab(ProjID_t projectId) {
|
|
|
|
// ZQVTabPage *tab = new ZQVTabPage(fathertab, "液路板-泵机控制");
|
|
|
|
// ZQFunctionListBox *box = new ZQFunctionListBox(tab, "泵机控制", 6);
|
|
|
|
|
|
|
|
// box->newFunc("pumpRotate", {"subid", "rpm"}, [](int argn, const char **args) { //
|
|
|
|
// CAN_MASTER->pumpRotate(kFixBoardId_LiquidCtrl, atoi(args[0]), atoi(args[1]));
|
|
|
|
// });
|
|
|
|
// box->newFunc("pumpStop", {"subid"}, [](int argn, const char **args) { //
|
|
|
|
// CAN_MASTER->pumpStop(kFixBoardId_LiquidCtrl, atoi(args[0]));
|
|
|
|
// });
|
|
|
|
|
|
|
|
// box->newFunc("pumpSetIholdIrunIdelay", {"subid", "ihold", "irun", "idelay"}, [](int argn, const char **args) { //
|
|
|
|
// CAN_MASTER->pumpSetIholdIrunIdelay(kFixBoardId_LiquidCtrl, atoi(args[0]), atoi(args[1]), atoi(args[2]), atoi(args[3]));
|
|
|
|
// });
|
|
|
|
// // pumpSetTzw
|
|
|
|
// box->newFunc("pumpSetTzw", {"subid", "tzw"}, [](int argn, const char **args) { //
|
|
|
|
// CAN_MASTER->pumpSetTzw(kFixBoardId_LiquidCtrl, atoi(args[0]), atoi(args[1]));
|
|
|
|
// });
|
|
|
|
|
|
|
|
// box->newFunc("pumpSetRamp", {"subid", "vs", "a1", "amx", "v1"}, [](int argn, const char **args) { //
|
|
|
|
// CAN_MASTER->pumpSetRamp(kFixBoardId_LiquidCtrl, atoi(args[0]), atoi(args[1]), atoi(args[2]), atoi(args[3]), atoi(args[4]));
|
|
|
|
// });
|
|
|
|
|
|
|
|
// box->newFunc("pumpSetSubicReg", {"subid", "regadd", "val"}, [](int argn, const char **args) { //
|
|
|
|
// CAN_MASTER->pumpSetSubicReg(kFixBoardId_LiquidCtrl, atoi(args[0]), atoi(args[1]), atoi(args[2]));
|
|
|
|
// });
|
|
|
|
|
|
|
|
// box->newFunc("pumpGetSubicReg", {"subid", "regadd"}, [](int argn, const char **args) { //
|
|
|
|
// int val = CAN_MASTER->pumpGetSubicReg(kFixBoardId_LiquidCtrl, atoi(args[0]), atoi(args[1]));
|
|
|
|
// ISHOW("val:%x", val);
|
|
|
|
// });
|
|
|
|
// tab->addSpacer();
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
|
|
|
|
static void buildH2O2Box(ZQVTabPage *tab, ProjID_t projectId, int32_t did) {} |
|
|
|
|
|
|
|
// void TabBuilder::buildPowerControlBoardTab(ProjID_t projectId) {
|
|
|
|
// {
|
|
|
|
// ZQVTabPage *tab = new ZQVTabPage(fathertab, "功率板");
|
|
|
|
// {
|
|
|
|
// 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();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
ZQVTabPage *TabBuilder::getTab(const char *tabname) { |
|
|
|
if (tabMap.find(tabname) == tabMap.end()) { |
|
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, "tabname"); |
|
|
|
ZQVTabPage *tab = new ZQVTabPage(fathertab, tabname); |
|
|
|
tabMap[tabname] = tab; |
|
|
|
} |
|
|
|
return tabMap[tabname]; |
|
|
@ -223,14 +99,20 @@ void TabBuilder::buildFnPumpCtrl(const char *tabname, int boardid) { |
|
|
|
void TabBuilder::buildHearterTab(const char *tabname, int boardid) { |
|
|
|
ZQVTabPage *tab = getTab(tabname); |
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "加热器", 4); |
|
|
|
box->newFunc("heaterCtrl", {"power"}, [this, boardid](int argn, const char **args) { CAN_MASTER->heaterCtrl(boardid, atoi(args[0])); }); |
|
|
|
box->newFunc("heaterCtrlSafeValve", {"valve_state"}, [this, boardid](int argn, const char **args) { CAN_MASTER->heaterCtrlSafeValve(boardid, atoi(args[0])); }); |
|
|
|
box->newFunc("heaterReadElectricCurrent", {}, [this, boardid](int argn, const char **args) { |
|
|
|
int val = CAN_MASTER->heaterReadElectricCurrent(boardid); |
|
|
|
|
|
|
|
box->newSubButton("加热打开", [this, boardid](int argn, const char **args) { CAN_MASTER->heaterCtrl(boardid, 1); }); |
|
|
|
box->newSubButton("加热关闭", [this, boardid](int argn, const char **args) { CAN_MASTER->heaterCtrl(boardid, 0); }); |
|
|
|
|
|
|
|
box->newSubButtonEnd(); |
|
|
|
box->newSubButton("加热安全阀打开", [this, boardid](int argn, const char **args) { CAN_MASTER->heaterCtrlSafeValve(boardid, 1); }); |
|
|
|
box->newSubButton("加热安全阀关闭", [this, boardid](int argn, const char **args) { CAN_MASTER->heaterCtrlSafeValve(boardid, 0); }); |
|
|
|
|
|
|
|
box->newSubButton("读取电流", [this, boardid](int argn, const char **args) { |
|
|
|
int val = CAN_MASTER->heaterReadEI(boardid); |
|
|
|
ISHOW("val:%d", val); |
|
|
|
}); |
|
|
|
box->newFunc("heaterReadTemperatureData", {}, [this, boardid](int argn, const char **args) { |
|
|
|
int val = CAN_MASTER->heaterReadTemperatureData(boardid); |
|
|
|
box->newSubButton("读取温度", [this, boardid](int argn, const char **args) { |
|
|
|
int val = CAN_MASTER->heaterReadTemperature(boardid); |
|
|
|
ISHOW("val:%d", val); |
|
|
|
}); |
|
|
|
} |
|
|
@ -279,11 +161,11 @@ void TabBuilder::buildTripleWarningLightTab(const char *tabname, int boardid) { |
|
|
|
void TabBuilder::buildWaterSensorTab(const char *tabname, int boardid) { |
|
|
|
ZQVTabPage *tab = getTab(tabname); |
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "水浸", 4); |
|
|
|
box->newFunc("读取-蒸发桶水浸传感器-状态", {}, [this, boardid](int argn, const char **args) { |
|
|
|
box->newSubButton("读取-蒸发桶水浸传感器-状态", [this, boardid](int argn, const char **args) { |
|
|
|
int state = CAN_MASTER->evaporationTankWSReadState(boardid); |
|
|
|
ISHOW("state:%d", state); |
|
|
|
}); |
|
|
|
box->newFunc("读取-设备底部水浸传感器-状态", {}, [this, boardid](int argn, const char **args) { |
|
|
|
box->newSubButton("读取-设备底部水浸传感器-状态", [this, boardid](int argn, const char **args) { |
|
|
|
int state = CAN_MASTER->bottomWSReadState(boardid); |
|
|
|
ISHOW("state:%d", state); |
|
|
|
}); |
|
|
@ -291,13 +173,17 @@ void TabBuilder::buildWaterSensorTab(const char *tabname, int boardid) { |
|
|
|
void TabBuilder::buildBlowerTab(const char *tabname, int boardid) { |
|
|
|
ZQVTabPage *tab = getTab(tabname); |
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "风机", 4); |
|
|
|
box->newFunc("风机控制", {"power"}, [this, boardid](int argn, const char **args) { CAN_MASTER->blowerCtrl(boardid, atoi(args[0])); }); |
|
|
|
box->newFunc("风机安全阀控制", {"valve_state"}, [this, boardid](int argn, const char **args) { CAN_MASTER->blowerCtrlSafeValve(boardid, atoi(args[0])); }); |
|
|
|
box->newFunc("风机读取电流", {}, [this, boardid](int argn, const char **args) { |
|
|
|
int val = CAN_MASTER->blowerReadElectricCurrent(boardid); |
|
|
|
box->newSubButton("风机打开", [this, boardid](int argn, const char **args) { CAN_MASTER->blowerCtrl(boardid, 1); }); |
|
|
|
box->newSubButton("风机关闭", [this, boardid](int argn, const char **args) { CAN_MASTER->blowerCtrl(boardid, 0); }); |
|
|
|
box->newSubButtonEnd(); |
|
|
|
box->newSubButton("风机安全阀打开", [this, boardid](int argn, const char **args) { CAN_MASTER->blowerCtrlSafeValve(boardid, 1); }); |
|
|
|
box->newSubButton("风机安全阀关闭", [this, boardid](int argn, const char **args) { CAN_MASTER->blowerCtrlSafeValve(boardid, 0); }); |
|
|
|
box->newSubButtonEnd(); |
|
|
|
box->newSubButton("风机读取电流", [this, boardid](int argn, const char **args) { |
|
|
|
int val = CAN_MASTER->blowerReadEI(boardid); |
|
|
|
ISHOW("val:%d", val); |
|
|
|
}); |
|
|
|
box->newFunc("风机是否错误", {}, [this, boardid](int argn, const char **args) { |
|
|
|
box->newSubButton("风机是否错误", [this, boardid](int argn, const char **args) { |
|
|
|
bool val = CAN_MASTER->blowerReadElectricIsError(boardid); |
|
|
|
ISHOW("val:%d", val); |
|
|
|
}); |
|
|
@ -306,10 +192,15 @@ void TabBuilder::buildBlowerTab(const char *tabname, int boardid) { |
|
|
|
void TabBuilder::buildAirCompressorTab(const char *tabname, int boardid) { |
|
|
|
ZQVTabPage *tab = getTab(tabname); |
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "空压机", 4); |
|
|
|
box->newFunc("空压机控制", {"power"}, [this, boardid](int argn, const char **args) { CAN_MASTER->airCompressorCtrl(boardid, atoi(args[0])); }); |
|
|
|
box->newFunc("空压机安全阀控制", {"valve_state"}, [this, boardid](int argn, const char **args) { CAN_MASTER->airCompressorCtrlSafeValve(boardid, atoi(args[0])); }); |
|
|
|
box->newSubButton("空压机打开", [this, boardid](int argn, const char **args) { CAN_MASTER->airCompressorCtrl(boardid, 1); }); |
|
|
|
box->newSubButton("空压机关闭", [this, boardid](int argn, const char **args) { CAN_MASTER->airCompressorCtrl(boardid, 0); }); |
|
|
|
box->newSubButtonEnd(); |
|
|
|
// box->newFunc("空压机安全阀控制", {"valve_state"}, [this, boardid](int argn, const char **args) { CAN_MASTER->airCompressorCtrlSafeValve(boardid, atoi(args[0])); });
|
|
|
|
box->newSubButton("空压机安全阀打开", [this, boardid](int argn, const char **args) { CAN_MASTER->airCompressorCtrlSafeValve(boardid, 1); }); |
|
|
|
box->newSubButton("空压机安全阀关闭", [this, boardid](int argn, const char **args) { CAN_MASTER->airCompressorCtrlSafeValve(boardid, 0); }); |
|
|
|
|
|
|
|
box->newFunc("空压机读取电流", {}, [this, boardid](int argn, const char **args) { |
|
|
|
int val = CAN_MASTER->airCompressorReadElectricCurrent(boardid); |
|
|
|
int val = CAN_MASTER->airCompressorReadEI(boardid); |
|
|
|
ISHOW("val:%d", val); |
|
|
|
}); |
|
|
|
} |
|
|
@ -317,7 +208,8 @@ void TabBuilder::buildAirCompressorTab(const char *tabname, int boardid) { |
|
|
|
void TabBuilder::buildAirTightnessTestACTab(const char *tabname, int boardid) { |
|
|
|
ZQVTabPage *tab = getTab(tabname); |
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "气密性测试空压机", 4); |
|
|
|
box->newFunc("空调控制", {"power"}, [this, boardid](int argn, const char **args) { CAN_MASTER->airTightnessTestACCtrl(boardid, atoi(args[0])); }); |
|
|
|
box->newSubButton("打开", [this, boardid](int argn, const char **args) { CAN_MASTER->airTightnessTestACCtrl(boardid, 1); }); |
|
|
|
box->newSubButton("关闭", [this, boardid](int argn, const char **args) { CAN_MASTER->airTightnessTestACCtrl(boardid, 0); }); |
|
|
|
} |
|
|
|
void TabBuilder::buildPSBusTab(const char *tabname, int boardid) { |
|
|
|
ZQVTabPage *tab = getTab(tabname); |
|
|
|