Browse Source

v3.0.3

master
zhaohe 5 months ago
parent
commit
4f083b08bf
  1. 8
      .settings/language.settings.xml
  2. 2
      stm32components
  3. BIN
      ui/hand_acid_mainboard_ui.HMI
  4. BIN
      ui/hand_acid_mainboard_ui.tft
  5. 4
      ui/ui.h
  6. 4
      ui/usrui.h
  7. 10
      usrc/apphardware/apphardware.cpp
  8. 2
      usrc/db/dao/acid_ch_cfg_dao.cpp
  9. 2
      usrc/db/dao/user_dao.cpp
  10. 2
      usrc/project_configs.h
  11. 6
      usrc/service/remote_controler_event_processer.cpp
  12. 30
      usrc/uicontroler/page/home_page.cpp
  13. 12
      usrc/uicontroler/page/mupage/muCHSetting_page.cpp
  14. 12
      usrc/uicontroler/ui_controler.cpp

8
.settings/language.settings.xml

@ -5,11 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<<<<<<< HEAD
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-1502072434083187607" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
=======
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-904211570983950489" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
>>>>>>> 541bbd702f91cfcdab14987942eadb80efe961b0
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@ -20,11 +16,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<<<<<<< HEAD
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-1473326386345260396" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
=======
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-947823089694795630" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
>>>>>>> 541bbd702f91cfcdab14987942eadb80efe961b0
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>

2
stm32components

@ -1 +1 @@
Subproject commit 6a1cbb0c87d2440d011f74f52a4a80691521542f
Subproject commit 90f08ae581ffe8686182f18ef9502ea6a08ac54b

BIN
ui/hand_acid_mainboard_ui.HMI

BIN
ui/hand_acid_mainboard_ui.tft

4
ui/ui.h

@ -107,8 +107,8 @@
#define ob_home_weekArr 45
#define ob_home_m0 46
#define ob_home_tc0 47
#define ob_home_p1 48
#define ob_home_t0 49
#define ob_home_blebattery 48
#define ob_home_blebatlevl 49
//navi.objs
#define ob_navi_navi 0
#define ob_navi_bak 1

4
ui/usrui.h

@ -1,4 +0,0 @@
#pragma once
#define pic_jog_mode 26
#define pic_continuous_mode 27

10
usrc/apphardware/apphardware.cpp

@ -81,11 +81,21 @@ void AppHardware::initialize() {
ZLOGI(TAG, "motor3 initialize TMC51X0:%x", MOTO3.readICVersion());
ZLOGI(TAG, "motor4 initialize TMC51X0:%x", MOTO4.readICVersion());
MOTO1.setGlobalScale(64);
MOTO2.setGlobalScale(64);
MOTO3.setGlobalScale(64);
MOTO4.setGlobalScale(64);
MOTO1.setIHOLD_IRUN(10, 31, 100);
MOTO2.setIHOLD_IRUN(10, 31, 100);
MOTO3.setIHOLD_IRUN(10, 31, 100);
MOTO4.setIHOLD_IRUN(10, 31, 100);
MOTO1.setScale(1000);
MOTO2.setScale(1000);
MOTO3.setScale(1000);

2
usrc/db/dao/acid_ch_cfg_dao.cpp

@ -49,7 +49,7 @@ void AcidChCfgDao::init() {
tabledata->item[i].mLPR = 1.0; // 电机 mlpr
tabledata->item[i].pumpDefVel = PUMPDEFVEL; // 泵机默认速度r/min RPM
tabledata->item[i].pipeLengthML = 35.5; // 酸液管路长度
tabledata->item[i].irun = 22; // 电机 irun
tabledata->item[i].irun = 10; // 电机 irun
// #define CH0APPENDML 0.2
// #define CH1APPENDML 0.2

2
usrc/db/dao/user_dao.cpp

@ -274,7 +274,7 @@ const char** UserDao::getUsrNameTable() {
memset(nameTable, 0, sizeof(nameTable));
for (int i = 0; i < MAX_USR_NUM; i++) {
if (usr_table_data->user[i].effective) {
sprintf(nameTableCache[i], "%-20s", usr_table_data->user[i].name);
sprintf(nameTableCache[i], "%s", usr_table_data->user[i].name);
nameTable[i] = nameTableCache[i];
// nameTable[i] = usr_table_data->user[i].name;
} else {

2
usrc/project_configs.h

@ -20,7 +20,7 @@
#define HARDWARE_VERSION 1 // 硬件版本
#define PROJECT "hand_acid_main_board" // 工程名称
#define APP_VERSION VERSION(3, 0, 2)
#define APP_VERSION VERSION(3, 0, 3)
#define APP_VERSION_MAIN ((APP_VERSION >> 16) & 0xff)
#define APP_VERSION_SUB ((APP_VERSION >> 8) & 0xff)
#define APP_VERSION_FIX (APP_VERSION & 0xff)

6
usrc/service/remote_controler_event_processer.cpp

@ -105,11 +105,7 @@ void RemoteControlerEventProcesser::processKeyEventInHomePage(hand_acid_remoter_
* @brief
*/
if (GSM->getRunMode() == khand_acid_m_jog_mode) {
GSM->setRunMode(khand_acid_m_continuous_mode);
} else if (GSM->getRunMode() == khand_acid_m_continuous_mode) {
GSM->setRunMode(khand_acid_m_jog_mode);
}
ZLOGW(TAG,"手柄修改模式的功能已经被禁用,只允许在屏幕修改模式");
} else if (keyEvent == hand_acid_remoter_kevent_preFilling) {
/**
* @brief

30
usrc/uicontroler/page/home_page.cpp

@ -126,6 +126,22 @@ class HomePage : public IPageProcesser {
} else if (bid == ob_home_MenuButton) {
UIS->chpage(pg_navi, true);
}
/**
* @brief
*/
if (bid == ob_home_RunModeVal || bid == ob_home_RunMode) {
if (PUMPCS->isWorking()) {
UIS->popWarningWin("工作中,请稍后再操作");
return;
}
if (GSM->getRunMode() == khand_acid_m_jog_mode) {
GSM->setRunMode(khand_acid_m_continuous_mode);
} else if (GSM->getRunMode() == khand_acid_m_continuous_mode) {
GSM->setRunMode(khand_acid_m_jog_mode);
}
}
}
virtual void onAppEvent(AppEvent* event) override {
if (event->type == kAE_RemoterHeartEvent) {
@ -228,8 +244,8 @@ class HomePage : public IPageProcesser {
UIControler::ins()->setPicturePicNum(thisPage, ob_home_RemoterS, ob_home_RemoterS1);
} else {
UIControler::ins()->setPicturePicNum(thisPage, ob_home_RemoterS, ob_home_RemoterS0);
UIControler::ins()->movePicOutOfScreen(thisPage, 48);
UIControler::ins()->movePicOutOfScreen(thisPage, 49);
UIControler::ins()->movePicOutOfScreen(thisPage, ob_home_blebattery);
UIControler::ins()->movePicOutOfScreen(thisPage, ob_home_blebatlevl);
}
}
@ -240,15 +256,15 @@ class HomePage : public IPageProcesser {
}
bool bleIsConnected = GStateMgr::ins()->getRemoterS();
if (bleIsConnected) {
UIControler::ins()->movePicToXY(thisPage, 48, 646, 28);
UIControler::ins()->movePicToXY(thisPage, 49, 647, 24);
UIControler::ins()->movePicToXY(thisPage, ob_home_blebattery, 646, 28); // 电池图标
UIControler::ins()->movePicToXY(thisPage, ob_home_blebatlevl, 647, 24); // 电池电量
if (heart_info.charge_flag != POWER_STDBY && power_val == 100) {
power_val = 99;
}
UIControler::ins()->setTxt(thisPage, 49, "%d", power_val);
UIControler::ins()->setTxt(thisPage, ob_home_blebatlevl, "%d", power_val);
} else {
UIControler::ins()->movePicOutOfScreen(thisPage, 48);
UIControler::ins()->movePicOutOfScreen(thisPage, 49);
UIControler::ins()->movePicOutOfScreen(thisPage, ob_home_blebattery);
UIControler::ins()->movePicOutOfScreen(thisPage, ob_home_blebatlevl);
}
if (heart_info.charge_flag == POWER_NORMAL) {
power_val = 0;

12
usrc/uicontroler/page/mupage/muCHSetting_page.cpp

@ -51,6 +51,7 @@ static cfgbid_table_iterm_t* CH_APPEND_ML_BIND_CFG;
static void Page_muPumpTest_onTimer(const void* tid);
#define PRECISION "%.2f"
#define MLPR_BIND_CFG_PRECISION "%.4f"
static const char* fmt(const char* txt, ...) {
static char buf[256];
@ -68,11 +69,11 @@ class MuChSetting : public IPageProcesser {
virtual void initialize() override {
IPageProcesser::initialize();
intCfg(0, &ACID_CHOOS_ENAME_BIND_CFG, "通道名称", AcidChCfgDao::getCfg(0)->acidChooseName, "", false);
intCfg(0, &ACID_CHOOS_ENAME_BIND_CFG, "酸液名称", AcidChCfgDao::getCfg(0)->acidChooseName, "", false);
intCfg(1, &IRUN_BIND_CFG, "IRUN", fmt("%d", AcidChCfgDao::getCfg(0)->irun), "", false);
intCfg(2, &PUMP_DEF_VEL_BIND_CFG, "", fmt("%d", AcidChCfgDao::getCfg(0)->pumpDefVel), "r/min", false);
intCfg(3, &PIPE_LENGTH_ML_BIND_CFG, "管路长度", fmt(PRECISION, AcidChCfgDao::getCfg(0)->pipeLengthML), "ml", false);
intCfg(4, &MLPR_BIND_CFG, "速转换系数", fmt(PRECISION, AcidChCfgDao::getCfg(0)->mLPR), "", false);
intCfg(2, &PUMP_DEF_VEL_BIND_CFG, "蠕动泵转", fmt("%d", AcidChCfgDao::getCfg(0)->pumpDefVel), "r/min", false);
intCfg(3, &PIPE_LENGTH_ML_BIND_CFG, "管路预充液体体积", fmt(MLPR_BIND_CFG_PRECISION, AcidChCfgDao::getCfg(0)->pipeLengthML), "ml", false);
intCfg(4, &MLPR_BIND_CFG, "转换系数(体积/转数)", fmt(PRECISION, AcidChCfgDao::getCfg(0)->mLPR), "", false);
intCfg(5, &CH_APPEND_ML_BIND_CFG, "防滴液体积", fmt(PRECISION, AcidChCfgDao::getCfg(0)->chAppendMl), "ml", false);
osTimerDef(statiUpdateTimer, Page_muPumpTest_onTimer);
@ -146,8 +147,7 @@ class MuChSetting : public IPageProcesser {
} else if (PIPE_LENGTH_ML_BIND_CFG && bid == PIPE_LENGTH_ML_BIND_CFG->cfgbid) { // 管路长度
UIControler::ins()->popNumKeyBoard(thisPage, bid, 4, fmt(PRECISION, AcidChCfgDao::getCfg(0)->pipeLengthML));
} else if (MLPR_BIND_CFG && bid == MLPR_BIND_CFG->cfgbid) { // 转速转换系数
UIControler::ins()->popNumKeyBoard(thisPage, bid, 4, fmt(PRECISION, AcidChCfgDao::getCfg(0)->mLPR));
UIControler::ins()->popNumKeyBoard(thisPage, bid, 7, fmt(MLPR_BIND_CFG_PRECISION, AcidChCfgDao::getCfg(0)->mLPR));
} else if (CH_APPEND_ML_BIND_CFG && bid == CH_APPEND_ML_BIND_CFG->cfgbid) { // 防滴液体积
UIControler::ins()->popNumKeyBoard(thisPage, bid, 4, fmt(PRECISION, AcidChCfgDao::getCfg(0)->chAppendMl));
}

12
usrc/uicontroler/ui_controler.cpp

@ -205,7 +205,7 @@ bool UIControler::readFiledAsInt(uint8_t pid, uint8_t bid, const char* filedName
return true;
}
ZLOGW(TAG, "readFiledAsInt pid:%d bid:%d %s failed retry %d", pid, bid, filedName, i);
osDelay(600);
osDelay(1000);
}
ZLOGE(TAG, "readFiledAsInt %s failed", filedName);
return false;
@ -344,7 +344,7 @@ void UIControler::sendcmd(const char* format, ...) {
}
void UIControler::sendcmd(const char* format, va_list args) {
static char buf[256];
static char buf[1024];
memset(buf, 0, sizeof(buf));
vsprintf(buf, format, args);
@ -353,7 +353,7 @@ void UIControler::sendcmd(const char* format, va_list args) {
#endif
uint8_t len = strlen(buf);
if (len > (256 - 3)) {
if (len > (1024 - 3)) {
ZLOGI(TAG, "sendcmd too long");
return;
}
@ -419,7 +419,7 @@ bool UIControler::visEx(uint8_t pid, uint8_t bid, bool val) {
if (!component->isPosInited) {
suc = readFiledAsInt(pid, bid, "x", &component->oldPosX);
if (!suc) {
for (size_t i = 0; i < 10; i++) {
for (size_t i = 0; i < 3; i++) {
ZLOGE(TAG, "fatal error, reboot");
osDelay(1000);
}
@ -427,7 +427,7 @@ bool UIControler::visEx(uint8_t pid, uint8_t bid, bool val) {
}
suc = readFiledAsInt(pid, bid, "y", &component->oldPosY);
if (!suc) {
for (size_t i = 0; i < 10; i++) {
for (size_t i = 0; i < 3; i++) {
ZLOGE(TAG, "fatal error, reboot");
osDelay(1000);
}
@ -532,7 +532,7 @@ void UIControler::popNumKeyBoard(uint8_t fromPid, uint8_t fromBid, int limitLeng
void UIControler::popKeyBMutSel(uint8_t fromPid, uint8_t fromBid, int selectvalindex, const char** selectvals) {
zlock_guard lg(m_cmdlock);
static char contentbus[128];
static char contentbus[512];
memset(contentbus, 0, sizeof(contentbus));
for (int i = 0;; i++) {
// \r\n Æ´½Ó×Ö·û´®Êý×é

Loading…
Cancel
Save