diff --git a/.cproject b/.cproject
index 65c01f3..8f9b407 100644
--- a/.cproject
+++ b/.cproject
@@ -134,34 +134,34 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -177,7 +177,7 @@
-
+
diff --git a/uappbase/apphal/apphal.cpp b/uappbase/apphal/apphal.cpp
index 7aeb4a0..abb789b 100644
--- a/uappbase/apphal/apphal.cpp
+++ b/uappbase/apphal/apphal.cpp
@@ -291,8 +291,9 @@ void AppHal::MX_I2C1_Init(void) {
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_I2C1_CLK_ENABLE();
- hi2c1.Instance = I2C1;
+ hi2c1.Instance = I2C1;
hi2c1.Init.ClockSpeed = 400000;
+ // hi2c1.Init.ClockSpeed = 1000000;
hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
hi2c1.Init.OwnAddress1 = 0;
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
diff --git a/uappbase/zhdb/zhdb.cpp b/uappbase/zhdb/zhdb.cpp
index e974c54..e590d9d 100644
--- a/uappbase/zhdb/zhdb.cpp
+++ b/uappbase/zhdb/zhdb.cpp
@@ -6,10 +6,11 @@
#include "ucomponents\eeprom\m24m02_i2c_eeprom.hpp"
uint8_t cache[50 * 1024] __attribute__((section(".ccmram")));
+// uint8_t cache[40 * 1024] ;
using namespace iflytop;
-static zhdb_table_t table[MAX_TABLE_NUM];
+static zhdb_table_t tablecache[MAX_TABLE_NUM];
static uint32_t table_num = 0;
static uint32_t table_add_off = 0;
static zmutex lock("ZHDB");
@@ -17,12 +18,19 @@ static zmutex lock("ZHDB");
static void read_from_eeprom(uint32_t add, uint8_t* data, size_t size) { //
for (size_t i = 0; i < size; i += 256) {
AppHardware::ins()->eeprom.read(add + i, data + i, 256);
+
+ // static uint8_t buf[256];
+ // AppHardware::ins()->eeprom.read(add + i, buf, 256);
+ // memcpy(data + i, buf, 256);
}
}
static void write_to_eeprom(uint32_t add, uint8_t* data, size_t size) { //
for (size_t i = 0; i < size; i += 256) {
AppHardware::ins()->eeprom.write(add + i, data + i, 256);
+ // static uint8_t buf[256];
+ // memcpy(buf, data + i, 256);
+ // AppHardware::ins()->eeprom.write(add + i, buf, 256);
}
}
@@ -38,8 +46,7 @@ zhdb_table_t* ZHDB::allocTable(const char* name, size_t size) {
}
//
- zhdb_table_t* table = &table[table_num];
- uint32_t add = table_add_off;
+ zhdb_table_t* table = &tablecache[table_num];
table->add = &cache[table_add_off];
table->size = size;
@@ -60,7 +67,7 @@ void ZHDB::storageData(uint8_t* data, size_t size) {
//
uint32_t off = data - cache;
uint32_t align_off = (off / 256) * 256;
- uint32_t real_size = (size / 256 + 1) * 256;
+ uint32_t real_size = (size / 256 + 1) * 256;
write_to_eeprom(align_off, &cache[align_off], real_size);
}
diff --git a/uappbase/zhdb/zhdb.hpp b/uappbase/zhdb/zhdb.hpp
index fb48008..b3744e3 100644
--- a/uappbase/zhdb/zhdb.hpp
+++ b/uappbase/zhdb/zhdb.hpp
@@ -6,6 +6,7 @@
#include "uappbase/appdep.hpp"
#define MAX_TABLE_NUM 10
+#define TABLE_BASE_VERSION 0xAABBCCDE
namespace iflytop {
diff --git a/ucomponents/eeprom/m24m02_i2c_eeprom.cpp b/ucomponents/eeprom/m24m02_i2c_eeprom.cpp
index 0ca318d..4456154 100644
--- a/ucomponents/eeprom/m24m02_i2c_eeprom.cpp
+++ b/ucomponents/eeprom/m24m02_i2c_eeprom.cpp
@@ -38,11 +38,18 @@ int32_t M24M02_I2C_EEPROM::write(int32_t add, uint8_t* val, int32_t len) {
ZASSERT(len % 4 == 0);
ZASSERT(add % 4 == 0);
int32_t ecode = 0;
- for (int32_t i = 0; i < len; i += 4) {
- ecode = write32(add + i, *(uint32_t*)&val[i]);
- if (ecode != 0) return ecode;
+
+ uint16_t deviceadd = DATA_ADD + (add >> 16);
+ uint16_t regadd = add & 0xffff;
+
+ // ZLOGI(TAG, "write add:%x, len:%d", add, len);
+ HAL_StatusTypeDef status = HAL_I2C_Mem_Write(m_i2c_handle, deviceadd << 1, regadd, I2C_MEMADD_SIZE_16BIT, (uint8_t*)val, len, 1000);
+ if (status != HAL_OK) {
+ ZLOGE(TAG, "!!! write fail:%d !!!", status);
}
- return ecode;
+ osDelay(12);
+
+ return halstatustoerr(status);
}
int32_t M24M02_I2C_EEPROM::read(int32_t add, uint8_t* val, int32_t len) {
zlock_guard lg(m_lock);
@@ -50,11 +57,17 @@ int32_t M24M02_I2C_EEPROM::read(int32_t add, uint8_t* val, int32_t len) {
ZASSERT(len % 4 == 0);
ZASSERT(add % 4 == 0);
int32_t ecode = 0;
- for (int32_t i = 0; i < len; i += 4) {
- ecode = read32(add + i, (uint32_t*)&val[i]);
- if (ecode != 0) return ecode;
+
+ uint16_t deviceadd = DATA_ADD + (add >> 16);
+ uint16_t regadd = add & 0xffff;
+
+ // ZLOGI(TAG, "read add:%x, len:%d", add, len);
+ HAL_StatusTypeDef status = HAL_I2C_Mem_Read(m_i2c_handle, deviceadd << 1, regadd, I2C_MEMADD_SIZE_16BIT, (uint8_t*)val, len, 1000);
+ if (status != HAL_OK) {
+ ZLOGE(TAG, "!!! read fail:%d !!!", status);
}
- return ecode;
+
+ return halstatustoerr(status);
}
int32_t M24M02_I2C_EEPROM::readCfgReg(int32_t add, uint32_t* val) {
diff --git a/usrc/apphardware/apphardware.cpp b/usrc/apphardware/apphardware.cpp
index a315041..7659768 100644
--- a/usrc/apphardware/apphardware.cpp
+++ b/usrc/apphardware/apphardware.cpp
@@ -1,4 +1,5 @@
#include "apphardware.hpp"
+
#include "ucomponents/zcan/zcan.hpp"
using namespace iflytop;
@@ -12,7 +13,6 @@ void AppHardware::setTJCScreenInDownloadMode() {
void AppHardware::initialize() {
ZCAN1::ins()->zcaninit(CAN1_TX_PIN, CAN1_RX_PIN);
- AppHal::MX_I2C1_Init();
AppHal::tmc_spi_init();
// TJC SCREEN UART INIT
@@ -103,6 +103,7 @@ void AppHardware::initialize() {
IO_OUT1.setState(false);
IO_OUT2.setState(false);
+ AppHal::MX_I2C1_Init();
eeprom.initialize(&hi2c1);
if (!eeprom.isOnline()) {
ZLOGE(TAG, "eeprom is not online");
diff --git a/usrc/db/dao/acid_ch_cfg_dao.cpp b/usrc/db/dao/acid_ch_cfg_dao.cpp
index 73b6748..d3a1465 100644
--- a/usrc/db/dao/acid_ch_cfg_dao.cpp
+++ b/usrc/db/dao/acid_ch_cfg_dao.cpp
@@ -9,7 +9,7 @@ using namespace iflytop;
/***********************************************************************************************************************
* MARCO *
***********************************************************************************************************************/
-#define TABLE_VERSION 0xAABBCCDD
+#define TABLE_VERSION TABLE_BASE_VERSION
#define TABLE_NAME "acid_ch_cfg_table"
/***********************************************************************************************************************
@@ -22,6 +22,7 @@ static struct {
uint32_t version;
uint32_t maxid;
AcidChannelCfg_t item[4];
+ uint32_t end;
}* tabledata;
static void storgeTableData() { ZHDB::storageData((uint8_t*)tabledata, sizeof(*tabledata)); }
@@ -31,9 +32,13 @@ void AcidChCfgDao::init() {
ASSERT(table != NULL, "alloc table failed");
tabledata = (decltype(tabledata))table->add;
- if (TABLE_VERSION != tabledata->version) {
+ if (TABLE_VERSION != tabledata->version || TABLE_VERSION != tabledata->end) {
+ ZLOGI(TAG, "%s table version not match, reset table", TABLE_NAME);
+
tabledata->version = TABLE_VERSION;
- tabledata->maxid = 0;
+ tabledata->end = TABLE_VERSION;
+
+ tabledata->maxid = 0;
for (int i = 0; i < 4; i++) {
tabledata->item[i].id = tabledata->maxid++; // 酸液通道id (0->3)
diff --git a/usrc/db/dao/acid_name_dao.cpp b/usrc/db/dao/acid_name_dao.cpp
index 9dbe3f5..9830c41 100644
--- a/usrc/db/dao/acid_name_dao.cpp
+++ b/usrc/db/dao/acid_name_dao.cpp
@@ -9,7 +9,7 @@ using namespace iflytop;
/***********************************************************************************************************************
* MARCO *
***********************************************************************************************************************/
-#define TABLE_VERSION 0xAABBCCDD
+#define TABLE_VERSION TABLE_BASE_VERSION
#define TABLE_NAME "acid_name_table"
/***********************************************************************************************************************
@@ -22,6 +22,7 @@ static struct {
uint32_t version;
uint32_t maxid;
acid_name_t acidName[1];
+ uint32_t end;
}* tabledata;
static const char* defaultAcidName[MAX_ACID_NUM] = {
@@ -52,8 +53,11 @@ void AcidNameDao::init() {
ASSERT(table != NULL, "alloc table failed");
tabledata = (decltype(tabledata))table->add;
- if (TABLE_VERSION != tabledata->version) {
+ if (TABLE_VERSION != tabledata->version || TABLE_VERSION != tabledata->end) {
+ ZLOGI(TAG, "%s table version not match, reset table", TABLE_NAME);
+
tabledata->version = TABLE_VERSION;
+ tabledata->end = TABLE_VERSION;
tabledata->maxid = 0;
// 初始化酸液名称
diff --git a/usrc/db/dao/device_setting_dao.cpp b/usrc/db/dao/device_setting_dao.cpp
index 861e4b2..ddb836b 100644
--- a/usrc/db/dao/device_setting_dao.cpp
+++ b/usrc/db/dao/device_setting_dao.cpp
@@ -9,7 +9,7 @@ using namespace iflytop;
/***********************************************************************************************************************
* MARCO *
***********************************************************************************************************************/
-#define TABLE_VERSION 0xAABBCCDD
+#define TABLE_VERSION TABLE_BASE_VERSION
#define TABLE_NAME "device_setting_dao"
/***********************************************************************************************************************
@@ -22,6 +22,7 @@ static struct {
uint32_t version;
uint32_t maxid;
device_setting_t item[1];
+ uint32_t end;
}* tabledata;
/***********************************************************************************************************************
@@ -34,13 +35,15 @@ void DeviceSettingDao::init() {
ASSERT(table != NULL, "alloc table failed");
tabledata = (decltype(tabledata))table->add;
- if (TABLE_VERSION != tabledata->version) {
+ if (TABLE_VERSION != tabledata->version || TABLE_VERSION != tabledata->end) {
+ ZLOGI(TAG, "%s table version not match, reset table", TABLE_NAME);
+
tabledata->version = TABLE_VERSION;
- tabledata->maxid = 0;
+ tabledata->end = TABLE_VERSION;
// 初始化酸液名称
- tabledata->item[0].id = tabledata->maxid++;
- tabledata->item[0].echDitrUpLimit = 99;
+ tabledata->item[0].id = tabledata->maxid++;
+ tabledata->item[0].echDitrUpLimit = 99;
tabledata->item[0].distrIntervalS = 1.5;
strncpy(tabledata->item[0].bleClientName, "", sizeof(tabledata->item[0].bleClientName));
}
diff --git a/usrc/db/dao/user_dao.cpp b/usrc/db/dao/user_dao.cpp
index 65e0cf3..4bfdbb6 100644
--- a/usrc/db/dao/user_dao.cpp
+++ b/usrc/db/dao/user_dao.cpp
@@ -9,7 +9,7 @@ using namespace iflytop;
/***********************************************************************************************************************
* MARCO *
***********************************************************************************************************************/
-#define TABLE_VERSION 0xAABBCCDD
+#define TABLE_VERSION TABLE_BASE_VERSION
#define MAX_USR_NUM 10
#define TABLE_NAME "user_table"
@@ -23,6 +23,7 @@ static struct {
uint32_t version;
uint32_t maxid;
user_t user[MAX_USR_NUM];
+ uint32_t end;
}* tabledata;
/***********************************************************************************************************************
@@ -50,8 +51,12 @@ void UserDao::init() { //
ASSERT(table != NULL, "alloc table failed");
tabledata = (decltype(tabledata))table->add;
- if (TABLE_VERSION != tabledata->version) {
+ if (TABLE_VERSION != tabledata->version || TABLE_VERSION != tabledata->end) {
+ ZLOGI(TAG, "%s table version not match, reset table", TABLE_NAME);
+
tabledata->version = TABLE_VERSION;
+ tabledata->end = TABLE_VERSION;
+
tabledata->maxid = 0;
for (int i = 0; i < MAX_USR_NUM; i++) {
tabledata->user[i].effective = false;
diff --git a/usrc/service/app_core.cpp b/usrc/service/app_core.cpp
index c7d3fc6..b9fc359 100644
--- a/usrc/service/app_core.cpp
+++ b/usrc/service/app_core.cpp
@@ -12,10 +12,20 @@
#include "ucomponents/zcan/zcan.hpp"
//
#include "uicontroler/front_end_controler.hpp"
+#include "uicontroler/page/page.hpp"
// #include "uicontroler/page/page.hpp"
+//
+#include "uappbase/zhdb/zhdb.hpp"
+//
+#include "db/dao/acid_ch_cfg_dao.hpp"
+#include "db/dao/acid_name_dao.hpp"
+#include "db/dao/device_setting_dao.hpp"
+#include "db/dao/user_dao.hpp"
+
#define TAG "main"
using namespace iflytop;
+static ZThread ledthread;
static const char* zhex2str(uint8_t* data, size_t len) {
static char buf[256];
@@ -26,31 +36,10 @@ static const char* zhex2str(uint8_t* data, size_t len) {
return buf;
}
-extern "C" {
-void umain() { AppCore::ins()->initialize(); }
-}
-
-static ZThread ledthread;
-
-void AppCore::initialize() {
- AppHal::MX_TIM6_Init();
- AppHal::MX_TIM7_Init();
-
- AppHal::DEBUG_UART_INIT(DEBUG_TX_PIN, DEBUG_RX_PIN, DEBUG_UART_BAUDRATE);
- zlog_init(&DEBUG_UART_INS);
-
- ZLOGI(TAG, "======================= boardinfo ==================== ");
- ZLOGI(TAG, "project : %s ", PROJECT);
- ZLOGI(TAG, "version : %s ", APP_VERSION);
- ZLOGI(TAG, "sn : %s", sn_get_str());
- ZLOGI(TAG, "=");
-
- SysMgr::ins()->initedFinished();
- SysMgr::ins()->dumpSysInfo();
-
+static void debuglegInit() {
// 启动调试指示灯功能
ledthread.init("led", 1024, osPriorityNormal);
- ledthread.start([this]() {
+ ledthread.start([]() {
static iflytop::ZGPIO debuglight;
debuglight.initAsOutput(DEBUG_LIGHT_IO, kxs_gpio_nopull, false, false);
while (true) {
@@ -74,8 +63,27 @@ void AppCore::initialize() {
osDelay(30);
}
});
+}
+
+extern "C" {
+void umain() { AppCore::ins()->initialize(); }
+}
+
+void AppCore::initialize() {
+ AppHal::MX_TIM6_Init();
+ AppHal::MX_TIM7_Init();
+
+ AppHal::DEBUG_UART_INIT(DEBUG_TX_PIN, DEBUG_RX_PIN, DEBUG_UART_BAUDRATE);
+ zlog_init(&DEBUG_UART_INS);
+
+ ZLOGI(TAG, "======================= boardinfo ==================== ");
+ ZLOGI(TAG, "project : %s ", PROJECT);
+ ZLOGI(TAG, "version : %s ", APP_VERSION);
+ ZLOGI(TAG, "sn : %s", sn_get_str());
+ ZLOGI(TAG, "=");
- osDelay(1000);
+ SysMgr::ins()->initedFinished();
+ SysMgr::ins()->dumpSysInfo();
// 硬件无关组件初始化
GStateMgr::ins()->initialize();
@@ -83,11 +91,18 @@ void AppCore::initialize() {
// 硬件初始化
AppHardware::ins()->initialize(); // 基础硬件初始化
- FrontEndControler::ins()->initialize();
-
- // FrontEndControler::ins()->chpage(pg_main);
+ ZLOGI(TAG, "load zhdb");
+ ZHDB::init();
+ UserDao::init();
+ AcidNameDao::init();
+ AcidChCfgDao::init();
+ DeviceSettingDao::init();
+ ZLOGI(TAG, "load zhdb end");
+ FrontEndControler::ins()->initialize();
+ PageInit();
+ FrontEndControler::ins()->chpage(pg_login);
while (true) osDelay(30);
}
diff --git a/usrc/service/remote_controler_event_processer.cpp b/usrc/service/remote_controler_event_processer.cpp
index 7c0091b..6dd054d 100644
--- a/usrc/service/remote_controler_event_processer.cpp
+++ b/usrc/service/remote_controler_event_processer.cpp
@@ -103,11 +103,11 @@ void RemoteControlerEventProcesser::processKeyEventFromRemoter(hand_acid_remoter
}
/**
- * @brief 下面几个页面蓝牙手柄按下,不做任何反应
+ * @brief 下面几个页面蓝牙手柄按下,不做任何反应,TODO
*/
- if (UIS->getNowPage() == pg_login || UIS->getNowPage() == pg_pStart || UIS->getNowPage() == pg_muBleHandSett || UIS->getNowPage() == pg_muPumpTest) {
- return;
- }
+// if (UIS->getNowPage() == pg_login || UIS->getNowPage() == pg_pStart || UIS->getNowPage() == pg_muBleHandSett || UIS->getNowPage() == pg_muPumpTest) {
+// return;
+// }
/**
* @brief 如果不在首页,则报警
diff --git a/usrc/uicontroler/base/page_processer.hpp b/usrc/uicontroler/base/page_processer.hpp
index fc779bb..8ab9b48 100644
--- a/usrc/uicontroler/base/page_processer.hpp
+++ b/usrc/uicontroler/base/page_processer.hpp
@@ -17,6 +17,7 @@ class OnPageLoadContext {
class IPageProcesser {
private:
/* data */
+ protected:
uint32_t pageId = 0;
public:
diff --git a/usrc/uicontroler/front_end_controler.hpp b/usrc/uicontroler/front_end_controler.hpp
index 20aef3e..e627dfe 100644
--- a/usrc/uicontroler/front_end_controler.hpp
+++ b/usrc/uicontroler/front_end_controler.hpp
@@ -58,10 +58,10 @@ class FrontEndControler {
bool echo(uint8_t tx, uint8_t* rx);
bool setTxt(uint8_t pid, uint8_t bid, const char* txt, ...);
- bool setTxt(uint8_t bid, const char* txt) { return setTxt(m_nowPage, bid, txt); }
+ // bool setTxt(uint8_t bid, const char* txt) { return setTxt(m_nowPage, bid, txt); }
bool setVal(uint8_t pid, uint8_t bid, int32_t val);
- bool setVal(uint8_t bid, int32_t val) { return setVal(m_nowPage, bid, val); }
+ // bool setVal(uint8_t bid, int32_t val) { return setVal(m_nowPage, bid, val); }
bool vis(uint16_t bid, int32_t val); // 不支持跨页面隐藏
// vis b0,0
diff --git a/usrc/uicontroler/page/login/page_login.cpp b/usrc/uicontroler/page/login/page_login.cpp
index fa12fb2..675142f 100644
--- a/usrc/uicontroler/page/login/page_login.cpp
+++ b/usrc/uicontroler/page/login/page_login.cpp
@@ -1,8 +1,10 @@
#pragma once
+#include "db/dao/user_dao.hpp"
#include "ui/ui.h"
#include "uicontroler/base/page_processer.hpp"
namespace iflytop {
using namespace std;
+#define TAG "PageLogin"
class PageLogin : public IPageProcesser {
private:
@@ -10,23 +12,61 @@ class PageLogin : public IPageProcesser {
PageLogin() : IPageProcesser(pg_login) {}
+ char userName[20] = {0};
+ char passwd[20] = {0};
+
public:
static PageLogin* ins() {
static PageLogin instance;
return &instance;
}
+ virtual void initialize() override {
+ IPageProcesser::initialize();
+
+ UIS->setTxt(pageId, ob_login_uName, ""); // 用户名
+ UIS->setTxt(pageId, ob_login_uNameEMsg, ""); // 用户名错误信息
+ UIS->setTxt(pageId, ob_login_pwd, ""); // 密码
+ UIS->setTxt(pageId, ob_login_pwdEMsg, ""); // 密码错误信息
+ }
+
private:
virtual void OnPageLoad(OnPageLoadContext* cxt) override {}
virtual void OnBackKey(OnPageLoadContext* cxt) override {}
- virtual void OnInputFieldContentChange(uint8_t bid, const char* text) override {}
- virtual void OnButton(uint8_t bid, uint8_t val) override {}
- virtual void OnDoubleStateButton(uint8_t bid, uint8_t val) override {}
- virtual void OnAppEvent(AppEvent_t* event) override {}
-};
+ virtual void OnInputFieldContentChange(uint8_t bid, const char* text) override {
+ if (bid == ob_login_uName) {
+ UIS->setTxt(pageId, ob_login_uName, text); //
+ strcpy(userName, text); //
+ UIS->setTxt(pageId, ob_login_pwdEMsg, ""); //
+ UIS->setTxt(pageId, ob_login_uNameEMsg, ""); //
+ } else if (bid == ob_login_pwd) {
+ UIS->setTxt(pageId, ob_login_pwd, text); //
+ strcpy(passwd, text); //
+ UIS->setTxt(pageId, ob_login_pwdEMsg, ""); //
+ UIS->setTxt(pageId, ob_login_pwdEMsg, ""); //
+ }
+ }
+ virtual void OnButton(uint8_t bid, uint8_t val) override {
+ if (bid == ob_login_blogin) {
+ user_t* user = UserDao::getUserByName(userName);
+ if (user == nullptr) {
+ UIS->setTxt(pageId, ob_login_uNameEMsg, "用户名不存在");
+ return;
+ }
+ if (strcmp(user->passwd, passwd) != 0) {
+ UIS->setTxt(pageId, ob_login_pwdEMsg, "密码错误");
+ return;
+ }
+ ZLOGI(TAG, "login %s success", userName);
+ }
+ }
+ virtual void OnDoubleStateButton(uint8_t bid, uint8_t val) override {}
+ virtual void OnAppEvent(AppEvent_t* event) override {}
+ private:
+};
void PageLoginInit() { PageLogin::ins()->initialize(); }
diff --git a/usrc/uicontroler/page/page.hpp b/usrc/uicontroler/page/page.hpp
new file mode 100644
index 0000000..654615e
--- /dev/null
+++ b/usrc/uicontroler/page/page.hpp
@@ -0,0 +1,8 @@
+#pragma once
+
+namespace iflytop {
+void PageLoginInit();
+
+static inline void PageInit() { PageLoginInit(); }
+
+} // namespace iflytop
\ No newline at end of file
diff --git a/usrc/uicontroler/pagerouter/page_bak_router.cpp b/usrc/uicontroler/pagerouter/page_bak_router.cpp
index 9e64e87..4a0df07 100644
--- a/usrc/uicontroler/pagerouter/page_bak_router.cpp
+++ b/usrc/uicontroler/pagerouter/page_bak_router.cpp
@@ -3,26 +3,26 @@ using namespace iflytop;
namespace iflytop {
int getBakPage(int nowPage) {
- if (
+ // if (
- nowPage == pg_muInterval || //
- nowPage == pg_muUsrMgr || //
- nowPage == pg_muTmrMgr || //
- nowPage == pg_muAcidType || //
- nowPage == pg_muDeviceInfo || //
- nowPage == pg_muSettings || //
- nowPage == pg_muAudit //
- ) {
- return GSM->getMenuPage();
- }
+ // nowPage == pg_muInterval || //
+ // nowPage == pg_muUsrMgr || //
+ // nowPage == pg_muTmrMgr || //
+ // nowPage == pg_muAcidType || //
+ // nowPage == pg_muDeviceInfo || //
+ // nowPage == pg_muSettings || //
+ // nowPage == pg_muAudit //
+ // ) {
+ // return GSM->getMenuPage();
+ // }
- if (nowPage == pg_muPumpTest || //
- nowPage == pg_muBleHandSett || //
- nowPage == pg_muMotorSett || //
- nowPage == pg_muPumpSett //
- ) {
- return pg_muSettings;
- }
+ // if (nowPage == pg_muPumpTest || //
+ // nowPage == pg_muBleHandSett || //
+ // nowPage == pg_muMotorSett || //
+ // nowPage == pg_muPumpSett //
+ // ) {
+ // return pg_muSettings;
+ // }
return pg_main;
}