|
|
@ -126,6 +126,7 @@ void DisinfectionApp::initialize() { |
|
|
|
if (PORT::isLiquidCtrlBoard() && (PORT::isPipeDM())) { |
|
|
|
ZLOGI(TAG, "ProportionalValveCtrl init"); |
|
|
|
LargeSpaceDMLiquidCtrlBoardHal::HUART2_INIT(9600); |
|
|
|
printf("======================= \n"); |
|
|
|
proportionalValveCtrl.initialize(&huart2); |
|
|
|
} |
|
|
|
|
|
|
@ -134,19 +135,22 @@ void DisinfectionApp::initialize() { |
|
|
|
***********************************************************************************************************************/ |
|
|
|
if (PORT::isLiquidCtrlBoard() && (PORT::isPipeDM())) { |
|
|
|
static ZGPIO airTightnessTestChGpio; |
|
|
|
static ZGPIO eValve; |
|
|
|
static ZGPIO eValve0; |
|
|
|
static ZGPIO eValve1; |
|
|
|
static bool state = false; |
|
|
|
airTightnessTestChGpio.initAsOutput(PD15, kxs_gpio_nopull, true, false); |
|
|
|
eValve.initAsOutput(PD14, kxs_gpio_nopull, false, true); |
|
|
|
|
|
|
|
airTightnessTestChGpio.initAsOutput(PD14, kxs_gpio_nopull, true, false); |
|
|
|
eValve0.initAsOutput(PD15, kxs_gpio_nopull, false, true); |
|
|
|
eValve1.initAsOutput(PC6, kxs_gpio_nopull, false, true); |
|
|
|
REG_LAMADA_FN(kfn_air_leak_detect_test_set_mode, [&](ProcessContext* cxt) { |
|
|
|
if (GET_PARAM(0) == 1) { |
|
|
|
airTightnessTestChGpio.write(1); // 内管路,气密性测试
|
|
|
|
eValve.write(0); // 电磁阀闭合
|
|
|
|
eValve0.write(0); |
|
|
|
eValve1.write(0);// 电磁阀闭合
|
|
|
|
state = true; |
|
|
|
} else { |
|
|
|
airTightnessTestChGpio.write(0); // 连接空气
|
|
|
|
eValve.write(1); // 电磁阀打开
|
|
|
|
eValve0.write(1); |
|
|
|
eValve1.write(1);// 电磁阀打开
|
|
|
|
state = false; |
|
|
|
} |
|
|
|
zcanbus_send_ack(cxt->packet, NULL, 0); |
|
|
|