|
|
@ -6,7 +6,7 @@ using namespace iflytop; |
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief |
|
|
|
* 酸类修改页面 |
|
|
|
* 锟斤拷锟斤拷锟睫革拷页锟斤拷 |
|
|
|
*/ |
|
|
|
|
|
|
|
#define PAGE pg_muSettings
|
|
|
@ -42,16 +42,16 @@ void Page_muSettings::initialize() { // |
|
|
|
if (packet->cmd == kzble_app_report_key_event) { |
|
|
|
int32_t keyEvent = *(int32_t*)packet->data; |
|
|
|
if (keyEvent == hand_acid_remoter_kevent_add_liquid) { |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "加液"); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "锟斤拷液"); |
|
|
|
} |
|
|
|
if (keyEvent == hand_acid_remoter_kevent_change_next_mode) { |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "模式切换"); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "模式锟叫伙拷"); |
|
|
|
} |
|
|
|
if (keyEvent == hand_acid_remoter_kevent_reflux) { |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "液路回流"); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "液路锟斤拷锟斤拷"); |
|
|
|
} |
|
|
|
if (keyEvent == hand_acid_remoter_kevent_preFilling) { |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "液路预充"); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "液路预锟斤拷"); |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
@ -70,9 +70,9 @@ void Page_muSettings::updatePage() { |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_pumpCoef2, zfmt("%.1f", getMotorMLPR(2))); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_pumpCoef3, zfmt("%.1f", getMotorMLPR(3))); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_pipeLen0, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_pipeLen1, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_pipeLen2, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_pipeLen3, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
// UIS->setTxt(PAGE, ob_muSettings_pipeLen1, getCfgStr(kcfg_pipeLengthML));
|
|
|
|
// UIS->setTxt(PAGE, ob_muSettings_pipeLen2, getCfgStr(kcfg_pipeLengthML));
|
|
|
|
// UIS->setTxt(PAGE, ob_muSettings_pipeLen3, getCfgStr(kcfg_pipeLengthML));
|
|
|
|
UIS->setTxt(PAGE, ob_muSettings_addAcidVel, getCfgStr(kcfg_pumpDefVel)); |
|
|
|
} |
|
|
|
|
|
|
@ -82,7 +82,7 @@ void Page_muSettings::OnPageLoad(OnPageLoadContext* cxt) { // |
|
|
|
void Page_muSettings::OnAppEvent(AppEvent_t* event) { |
|
|
|
if (event->type == kAppEvent_BleConnectEvent) { |
|
|
|
ZLOGI(TAG, "ble connect success"); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "绑定成功"); |
|
|
|
UIS->setTxt(PAGE, ob_muSettings_bleCliName, "锟襟定成癸拷"); |
|
|
|
CS->setcfgAndFlush(kcfg_bleClientName, event->d.bleName); |
|
|
|
m_scaning = false; |
|
|
|
} |
|
|
@ -133,20 +133,21 @@ void Page_muSettings::OnInputFieldContentChange(uint8_t bid, const char* text) { |
|
|
|
UIS->setTxt(bid, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
} |
|
|
|
|
|
|
|
else if (bid == ob_muSettings_pipeLen1) { |
|
|
|
CS->setcfg(kcfg_pipeLengthML, text); |
|
|
|
UIS->setTxt(bid, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
} |
|
|
|
|
|
|
|
else if (bid == ob_muSettings_pipeLen2) { |
|
|
|
CS->setcfg(kcfg_pipeLengthML, text); |
|
|
|
UIS->setTxt(bid, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
} |
|
|
|
|
|
|
|
else if (bid == ob_muSettings_pipeLen3) { |
|
|
|
CS->setcfg(kcfg_pipeLengthML, text); |
|
|
|
UIS->setTxt(bid, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
} |
|
|
|
// else if (bid == ob_muSettings_pipeLen1) {
|
|
|
|
// CS->setcfg(kcfg_pipeLengthML, text);
|
|
|
|
// UIS->setTxt(b
|
|
|
|
id, getCfgStr(kcfg_pipeLengthML)); |
|
|
|
// }
|
|
|
|
//
|
|
|
|
// else if (bid == ob_muSettings_pipeLen2) {
|
|
|
|
// CS->setcfg(kcfg_pipeLengthML, text);
|
|
|
|
// UIS->setTxt(bid, getCfgStr(kcfg_pipeLengthML));
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// else if (bid == ob_muSettings_pipeLen3) {
|
|
|
|
// CS->setcfg(kcfg_pipeLengthML, text);
|
|
|
|
// UIS->setTxt(bid, getCfgStr(kcfg_pipeLengthML));
|
|
|
|
// }
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* addAcidVel * |
|
|
@ -165,15 +166,15 @@ void Page_muSettings::OnButton(uint8_t bid, uint8_t val) { |
|
|
|
if (bid == ob_muSettings_bak) { |
|
|
|
UIS->chpage(GSM->getMenuPage()); |
|
|
|
if (m_scaning) { |
|
|
|
RCTRL->startScan("XXXXXXXXX", false); // 相当于停止扫描
|
|
|
|
RCTRL->startScan("XXXXXXXXX", false); // 锟洁当锟斤拷停止扫锟斤拷
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (bid == ob_muSettings_bleScan) { |
|
|
|
ZLOGI(TAG, "bleScan"); |
|
|
|
bool suc = RCTRL->startScan(BLENAME, true); |
|
|
|
if (suc) UIS->setTxt(PAGE, ob_muSettings_bleCliName, "扫描中..."); |
|
|
|
if (suc) UIS->setTxt(PAGE, ob_muSettings_bleCliName, "扫锟斤拷锟斤拷..."); |
|
|
|
m_scaning = true; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
// muAcidType
|
|
|
|
// muAcidType
|