|
|
@ -361,12 +361,11 @@ void TabBuilder::buildValveCtrlTab(const char *tabname, int boardid) { |
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
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); |
|
|
|
box->newFunc("读取状态(0:无液体, 1:低液位, 2:中液位, 3:高液位)", {}, [this, boardid](int argn, const char **args) { //
|
|
|
|
shared_ptr<Receipt> receipt = CAN_MASTER->getCanProtocolCom()->callcmd0(boardid, kfn_disinfectant_bucket_level_sensor_read_level, 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); |
|
|
|