Browse Source

update

moveToEndTestVersion
zhaohe 11 months ago
parent
commit
813929160c
  1. 2
      app_protocols/transmit_disfection_protocol
  2. 43
      usrc/app/dmapp.cpp

2
app_protocols/transmit_disfection_protocol

@ -1 +1 @@
Subproject commit 4aef96865307cfad9f2386253496f696c6ed5ecf
Subproject commit e4de0c8b6fac07853f99ce3b9562e490c8f27923

43
usrc/app/dmapp.cpp

@ -140,37 +140,28 @@ void DisinfectionApp::initialize() {
if (PORT::isLiquidCtrlBoard() && (PORT::isPipeDM())) {
static air_leak_test_mode_t airLeakTestMode = kAirLeakTestMode_disinfection;
static ZGPIO airTightnessTestChGpio;
static ZGPIO eValve0;
static ZGPIO eValve1;
airTightnessTestChGpio.initAsOutput(PD14, kxs_gpio_nopull, true, false);
eValve0.initAsOutput(PD15, kxs_gpio_nopull, true, false);
eValve1.initAsOutput(PC6, kxs_gpio_nopull, true, false);
static ZGPIO eValve0;
static ZGPIO eValve1;
static ZGPIO eValve2;
eValve0.initAsOutput(PD14, kxs_gpio_nopull, true, false);
eValve1.initAsOutput(PD15, kxs_gpio_nopull, true, false);
eValve2.initAsOutput(PC6, kxs_gpio_nopull, true, false); // 空气通道电磁阀
REG_LAMADA_FN(kfn_air_leak_test_set_mode, [&](ProcessContext* cxt) {
if (GET_PARAM(0) == kAirLeakTestMode_disinfection) {
airTightnessTestChGpio.write(0); // 内管路
eValve0.write(0); // 联通
eValve1.write(0); // 联通
eValve2.write(0); // 内管路
eValve0.write(0); // 联通
eValve1.write(0); // 联通
} else if (GET_PARAM(0) == kAirLeakTestMode_inflation) {
airTightnessTestChGpio.write(1); // 连接空气
eValve0.write(0); // 联通
eValve1.write(0); // 联通
eValve2.write(1); // 联通空气
eValve0.write(0); // 联通
eValve1.write(0); // 联通
} else if (GET_PARAM(0) == kAirLeakTestMode_leakTest) {
airTightnessTestChGpio.write(0); // 内管路
eValve0.write(1); // 闭合
eValve1.write(1); // 闭合
} else if (GET_PARAM(0) == kAirLeakTestMode_closeAll) {
airTightnessTestChGpio.write(0);
eValve0.write(0);
eValve1.write(0);
} else if (GET_PARAM(0) == kAirLeakTestMode_openAll) {
airTightnessTestChGpio.write(1);
eValve0.write(1);
eValve1.write(1);
eValve2.write(0); // 内管路
eValve0.write(1); // 封闭
eValve1.write(1); // 封闭
}
// kAirLeakTestMode_closeAll
// kAirLeakTestMode_openAll
airLeakTestMode = (air_leak_test_mode_t)GET_PARAM(0);
zcanbus_send_ack(cxt->packet, NULL, 0);
});

Loading…
Cancel
Save