|
|
@ -349,7 +349,27 @@ void TabBuilder::buildValveCtrlTab(const char *tabname, int boardid) { |
|
|
|
ZQVTabPage *tab = getTab(tabname); |
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "电磁阀", 4); |
|
|
|
box->newFunc("加液进气电磁阀(打开,可以正常加液排液,关闭后加液泵倒转可以排空管路)", {"open(1)/cloce(0)"}, [this, boardid](int argn, const char **args) { //
|
|
|
|
CAN_MASTER->getCanProtocolCom()->callcmd1(boardid, kfn_add_liquid_pump_air_intake_valve, atoi(args[0]), DEFUALT_OVERTIME); |
|
|
|
CAN_MASTER->getCanProtocolCom()->callcmd1(boardid, kfn_set_add_fluid_channel_selector_valve, atoi(args[0]), DEFUALT_OVERTIME); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// void TabBuilder::buildValveCtrlTab(const char *tabname, int boardid) {
|
|
|
|
// ZQVTabPage *tab = getTab(tabname);
|
|
|
|
// ZQFunctionListBox *box = new ZQFunctionListBox(tab, "电磁阀", 4);
|
|
|
|
// box->newFunc("加液进气电磁阀(打开,可以正常加液排液,关闭后加液泵倒转可以排空管路)", {"open(1)/cloce(0)"}, [this, boardid](int argn, const char **args) { //
|
|
|
|
// CAN_MASTER->getCanProtocolCom()->callcmd1(boardid, kfn_set_add_fluid_channel_selector_valve, atoi(args[0]), DEFUALT_OVERTIME);
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
void TabBuilder::buildLiquidLevelStateReaderTab(const char *tabname, int boardid) { |
|
|
|
ZQVTabPage *tab = getTab(tabname); |
|
|
|
ZQFunctionListBox *box = new ZQFunctionListBox(tab, "液位(IO版)状态读取", 4); |
|
|
|
box->newFunc("读取状态(如果是IO0:低液位,IO1:中液位,IO2:高液位)", {}, [this, boardid](int argn, const char **args) { //
|
|
|
|
shared_ptr<Receipt> receipt = CAN_MASTER->getCanProtocolCom()->callcmd0(boardid, kfn_liquid_level_read_io_state, DEFUALT_OVERTIME); |
|
|
|
ISHOW("IO0:%d", receipt->getContent(0) & 0x01); |
|
|
|
ISHOW("IO1:%d", (receipt->getContent(0) >> 1) & 0x01); |
|
|
|
ISHOW("IO2:%d", (receipt->getContent(0) >> 2) & 0x01); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|