|
@@ -69,14 +69,16 @@ static void CheckMenuButton_entry(void *parameter) {
|
|
|
if (button_state.b4>=5) button_state.b4 = 0;
|
|
|
if (button_state.b5>=5) button_state.b5 = 0;
|
|
|
if (button_state.b7>=15) button_state.b7 = 0;
|
|
|
-
|
|
|
-// if (HAL_GPIO_ReadPin(pwr_GPIO_Port, pwr_Pin) == 0) {
|
|
|
-// rt_thread_mdelay(2000);
|
|
|
-// if ((HAL_GPIO_ReadPin(pwr_GPIO_Port, pwr_Pin) == 0) ) {
|
|
|
-// beep();
|
|
|
-// pwr_lock_off();
|
|
|
-// }
|
|
|
-// }
|
|
|
+// if (WeightConst_SBType == 3 && isnewBan==1)
|
|
|
+ {
|
|
|
+ if (HAL_GPIO_ReadPin(pwr_GPIO_Port, pwr_Pin) == 0) {
|
|
|
+ rt_thread_mdelay(2000);
|
|
|
+ if ((HAL_GPIO_ReadPin(pwr_GPIO_Port, pwr_Pin) == 0) ) {
|
|
|
+ beep();
|
|
|
+ pwr_lock_on();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
// if (WeightConst_TQ==14) ad_sample=Ad_Sample1();//get_weight();
|
|
|
if (WeightConst_SBType<5)
|
|
@@ -469,7 +471,7 @@ static void CheckButton_entry(void *parameter) {
|
|
|
rt_thread_mdelay(2000);
|
|
|
if ((HAL_GPIO_ReadPin(pwr_GPIO_Port, pwr_Pin) == 0) ) {
|
|
|
beep();
|
|
|
- pwr_lock_off();
|
|
|
+ pwr_lock_on();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -482,20 +484,20 @@ static void CheckButton_entry(void *parameter) {
|
|
|
// beep();
|
|
|
// WeightConst_DELAYTIME = (pf_comp.data.delaytime*60)+1; //ÔÊÐí°´¼üÌø¹ý½Á°èÑÓʱ
|
|
|
}
|
|
|
- else if (pf_comp.data.needBegin==1 && WeightConst_WeightHaveBegin==0)
|
|
|
+ else if (pf_comp.data.needBegin==1 && WeightConst_WeightHaveBegin==0)
|
|
|
{
|
|
|
- beep();
|
|
|
- rt_sem_take(weight_lock, RT_WAITING_FOREVER);
|
|
|
- WeightConst_WeightBegin = WeightConst_WeightCur;
|
|
|
- rt_sem_release(weight_lock);
|
|
|
- CompleteTarget_order = pf_comp.data.pfsort;
|
|
|
- write_Flash("completeorder", &CompleteTarget_order, sizeof(CompleteTarget_order));
|
|
|
- rt_sem_take(setTIME_lock, RT_WAITING_FOREVER);
|
|
|
- write_Flash("begintime", &TimeConst, sizeof(TimeConst));
|
|
|
- rt_sem_release(setTIME_lock);
|
|
|
- write_Flash("beginweight", &WeightConst_WeightBegin, sizeof(WeightConst_WeightBegin));
|
|
|
- getTargetWeight();
|
|
|
- }
|
|
|
+// beep();
|
|
|
+// rt_sem_take(weight_lock, RT_WAITING_FOREVER);
|
|
|
+// WeightConst_WeightBegin = WeightConst_WeightCur;
|
|
|
+// rt_sem_release(weight_lock);
|
|
|
+// CompleteTarget_order = pf_comp.data.pfsort;
|
|
|
+// write_Flash("completeorder", &CompleteTarget_order, sizeof(CompleteTarget_order));
|
|
|
+// rt_sem_take(setTIME_lock, RT_WAITING_FOREVER);
|
|
|
+// write_Flash("begintime", &TimeConst, sizeof(TimeConst));
|
|
|
+// rt_sem_release(setTIME_lock);
|
|
|
+// write_Flash("beginweight", &WeightConst_WeightBegin, sizeof(WeightConst_WeightBegin));
|
|
|
+// getTargetWeight();
|
|
|
+ }
|
|
|
else if (tsdb_recordcount('p')>0 && delayKeying == 0 && WeightConst_Product_Run)
|
|
|
{
|
|
|
rt_sem_release(delay_key_sem);
|
|
@@ -697,8 +699,7 @@ static void CheckButton_entry(void *parameter) {
|
|
|
beep();
|
|
|
}
|
|
|
else {
|
|
|
- // Planback();
|
|
|
- /*
|
|
|
+ // Planback();
|
|
|
if (pf_comp.data.needBegin==1 && WeightConst_WeightHaveBegin==0)
|
|
|
{
|
|
|
beep();
|
|
@@ -712,7 +713,7 @@ static void CheckButton_entry(void *parameter) {
|
|
|
rt_sem_release(setTIME_lock);
|
|
|
write_Flash("beginweight", &WeightConst_WeightBegin, sizeof(WeightConst_WeightBegin));
|
|
|
getTargetWeight();
|
|
|
- }*/
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|