diff --git a/IflytopCom/IflytopCom.exe b/IflytopCom/IflytopCom.exe index daeec09..e18ebb3 100644 Binary files a/IflytopCom/IflytopCom.exe and b/IflytopCom/IflytopCom.exe differ diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..8392b86 --- /dev/null +++ b/build.bat @@ -0,0 +1,4 @@ +cd build +make -j8 +cd .. +copy build\IflytopCom.exe IflytopCom\ \ No newline at end of file diff --git a/init.bat b/init.bat new file mode 100644 index 0000000..ea13546 --- /dev/null +++ b/init.bat @@ -0,0 +1 @@ +"C:\Program Files\CMake\bin\cmake.exe" -B "build" "-GMinGW Makefiles" "-DCMAKE_BUILD_TYPE:STRING=Release" "-DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=C:/Qt/Qt5.12.12/Tools/QtCreator/share/qtcreator/package-manager/auto-setup.cmake" "-DQT_QMAKE_EXECUTABLE:STRING=C:/Qt/Qt5.12.12/5.12.12/mingw73_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:STRING=C:/Qt/Qt5.12.12/5.12.12/mingw73_64" "-DCMAKE_C_COMPILER:STRING=C:/Qt/Qt5.12.12/Tools/mingw730_64/bin/gcc.exe" "-DCMAKE_CXX_COMPILER:STRING=C:/Qt/Qt5.12.12/Tools/mingw730_64/bin/g++.exe" diff --git a/release/IflytopCom.exe b/release/IflytopComV103.exe similarity index 59% rename from release/IflytopCom.exe rename to release/IflytopComV103.exe index f1fee66..e08345f 100644 Binary files a/release/IflytopCom.exe and b/release/IflytopComV103.exe differ diff --git a/src/app/transmit_disinfection/channel/transmit_disinfection_can_master.hpp b/src/app/transmit_disinfection/channel/transmit_disinfection_can_master.hpp index 3ea7ff0..f66d490 100644 --- a/src/app/transmit_disinfection/channel/transmit_disinfection_can_master.hpp +++ b/src/app/transmit_disinfection/channel/transmit_disinfection_can_master.hpp @@ -126,9 +126,9 @@ class TransmitDisinfectionCanMaster { int proportionalIsBusy(int boardid) { return m_com->callcmd0(boardid, kfn_proportional_is_busy, DEFUALT_OVERTIME)->getContent(0); } // kfn_air_tightness_test_is_cutoff - void airTightnessTestCloseOffCh(int boardid) { m_com->callcmd1(boardid, kfn_air_leak_detect_ac_ctrl,1, DEFUALT_OVERTIME); } - void airTightnessTestOpenCh(int boardid) { m_com->callcmd1(boardid, kfn_air_leak_detect_ac_ctrl, 0,DEFUALT_OVERTIME); } - int airTightnessTestIsCutoff(int boardid) { return m_com->callcmd0(boardid, kfn_air_leak_detect_ac_is_open, DEFUALT_OVERTIME)->getContent(0); } + // void airTightnessTestCloseOffCh(int boardid) { m_com->callcmd1(boardid, kfn_air_leak_detect_ac_ctrl,1, DEFUALT_OVERTIME); } + // void airTightnessTestOpenCh(int boardid) { m_com->callcmd1(boardid, kfn_air_leak_detect_ac_ctrl, 0,DEFUALT_OVERTIME); } + // int airTightnessTestIsCutoff(int boardid) { return m_com->callcmd0(boardid, kfn_air_leak_detect_ac_is_open, DEFUALT_OVERTIME)->getContent(0); } void extChSelectorSetCh(int boardid, int ch) { m_com->callcmd1(boardid, kfn_ext_ch_selector_set_ch, ch, DEFUALT_OVERTIME); } int extChSelectorGetCh(int boardid) { return m_com->callcmd0(boardid, kfn_ext_ch_selector_get_ch, DEFUALT_OVERTIME)->getContent(0); } diff --git a/src/app/transmit_disinfection/utils/tabbuilder.cpp b/src/app/transmit_disinfection/utils/tabbuilder.cpp index 77b85e0..edeecde 100644 --- a/src/app/transmit_disinfection/utils/tabbuilder.cpp +++ b/src/app/transmit_disinfection/utils/tabbuilder.cpp @@ -302,7 +302,7 @@ void TabBuilder::buildPSBusTab(const char *tabname, int boardid) { void TabBuilder::buildProportionalTab(const char *tabname, int boardid) { ZQVTabPage *tab = getTab(tabname); ZQFunctionListBox *box = new ZQFunctionListBox(tab, "比例阀", 4); - box->newFunc("设置比例阀", {"valveId", "valveValue"}, [this, boardid](int argn, const char **args) { // + box->newFunc("设置比例阀", {"valveId(1->255)", "valveValue(0->255)"}, [this, boardid](int argn, const char **args) { // CAN_MASTER->proportionalSetValve(boardid, atoi(args[0]), atoi(args[1])); }); box->newFunc("读取比例阀位置", {}, [this, boardid](int argn, const char **args) { // @@ -317,17 +317,19 @@ void TabBuilder::buildProportionalTab(const char *tabname, int boardid) { void TabBuilder::buildAirTightnessTestTab(const char *tabname, int boardid) { ZQVTabPage *tab = getTab(tabname); ZQFunctionListBox *box = new ZQFunctionListBox(tab, "气密性测试", 4); - box->newSubButton("气密性测试-封闭通道", [this, boardid](int argn, const char **args) { // - CAN_MASTER->airTightnessTestCloseOffCh(boardid); + box->newSubButton("消毒模式", [this, boardid](int argn, const char **args) { // + CAN_MASTER->getCanProtocolCom()->callcmd1(boardid, kfn_air_leak_test_set_mode, 0, DEFUALT_OVERTIME); }); - - box->newSubButton("气密性测试-释放通道", [this, boardid](int argn, const char **args) { // - CAN_MASTER->airTightnessTestOpenCh(boardid); + box->newSubButton("打气模式", [this, boardid](int argn, const char **args) { // + CAN_MASTER->getCanProtocolCom()->callcmd1(boardid, kfn_air_leak_test_set_mode, 1, DEFUALT_OVERTIME); + }); + box->newSubButton("气压测试模式", [this, boardid](int argn, const char **args) { // + CAN_MASTER->getCanProtocolCom()->callcmd1(boardid, kfn_air_leak_test_set_mode, 2, DEFUALT_OVERTIME); }); box->newSubButtonEnd(); - box->newSubButton("气密性测试-是否封闭", [this, boardid](int argn, const char **args) { // - int val = CAN_MASTER->airTightnessTestIsCutoff(boardid); - ISHOW("val:%d", val); + box->newSubButton("读取模式(0:消毒,1:打气,2:气压测试)", [this, boardid](int argn, const char **args) { // + shared_ptr receipt = CAN_MASTER->getCanProtocolCom()->callcmd0(boardid, kfn_air_leak_test_get_mode, DEFUALT_OVERTIME); + ISHOW("val:%d", receipt->getContent(0)); }); } diff --git a/src/app_version.hpp b/src/app_version.hpp index fff127b..6650add 100644 --- a/src/app_version.hpp +++ b/src/app_version.hpp @@ -1,7 +1,8 @@ #pragma once #define VERSION(main, sub, fix) (main << 16 | sub << 8 | fix << 0) -#define APP_VERSION VERSION(1, 0, 2) +#define APP_VERSION VERSION(1, 0, 3) +#define APP_VERSION_STR "1.0.3" #define APP_VERSION_MAIN VERSION_MAIN(APP_VERSION) #define APP_VERSION_SUB VERSION_SUB(APP_VERSION) diff --git a/src/main.cpp b/src/main.cpp index b8ff427..e67638e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,6 +26,7 @@ #include "app/transmit_disinfection/large_space_disinfection_machine.hpp" #include "app/transmit_disinfection/little_space_disinfection_machine.hpp" #include "app/transmit_disinfection/pipe_dm.hpp" +#include "app_version.hpp" // #include @@ -54,7 +55,7 @@ int main(int argc, char* argv[]) { REG_APP(ExtH2O2Sensor); ZQUI::ins()->initialize(); - DOINUI([]() { ZQUI::ins()->mainW()->setVersionInfo(1, "APP_VERSION", "1.0.0"); }); + DOINUI([]() { ZQUI::ins()->mainW()->setVersionInfo(1, "APP_VERSION",APP_VERSION_STR ); }); return a.exec(); }