扳手停止阈值90% main
authorkyz <kongyuzhong@google.com>
Wed, 29 Apr 2026 02:11:53 +0000 (10:11 +0800)
committerkyz <kongyuzhong@google.com>
Wed, 29 Apr 2026 02:11:53 +0000 (10:11 +0800)
QiDong/System/WrenchManage.c

index 1aee686d772067bcf68bfb360e2c72620a96e06f..b82ae60316a8df327289123f75b1e5c1cc4d0a7d 100644 (file)
@@ -30,7 +30,7 @@ static uint8_t machine_step = 0;
 float start_compareFac = 0.90; //Æô¶¯¼ì²âãÐÖµºÍÄ¿±êãÐÖµµÄ°Ù·Ö±È
 
 //°´¿Í»§ÒªÇó£¬ÌṩֹͣãÐֵΪĿ±êѹÁ¦µÄ80%ºÍ90% Á½ÖÖ°æ±¾£¬2026/3/4
-float finish_compareFac = 0.90   //Í£Ö¹ãÐÖµ
+const float finish_compareFac = 0.90   //Í£Ö¹ãÐÖµ
 
 ; //Íê³É¼ì²âãÐÖµºÍÄ¿±êãÐÖµµÄ°Ù·Ö±È
 float temppress = 0 ;
@@ -199,7 +199,7 @@ static void Machine_DoPress(void)                                     //״̬
                        if(qiya < pressure_start_threshold(temppress) && SleepState == 1 && Adjusting_torque_flag == 1) //°âÊÖ°´Ï  ÕâÀïÈç¹ûÏÖ³¡ÆøÑ¹Ò»Ö±±È½ÏµÍ£¬ÉèÖõÄѹÁ¦Èç¹û¸ß  ¾ÍûÓа취¼ì²âµ½°âÊÖ°´ÏµÄ״̬
                        {
                                turn_flag = 1;
-                               //if(wrench_device.rotate_start_count++ >= (ROTATE_START_NUM_5MS)/2)
+                               if(wrench_device.rotate_start_count++ >= (ROTATE_START_NUM_5MS)/2)
                                {
                                        LED_SetLedStatus(LED_ID_DETECT_WORK,1);      //LED¼ì²â¹¤×÷״̬µÆÁÁ
                                        Beep_SetbeepStatus(BEEP_ID_DETECT_WORK,1);   //·äÃùÆ÷¼ì²â¹¤×÷״̬Ïì
@@ -228,7 +228,7 @@ static void Machine_DoPress(void)                                     //״̬
                                {
                                        //ÒÔϼÆÊýROTATE_STOP_NUM_5MS Ëƺõ²»Õý³££¬ÒòÎªÇ°Ãæ»¹Óиö¼ÆÊýÆ÷MS_COUNT_200
                                        //Á½¸ö¼ÆÊýÆ÷Ïà³Ë¾ÍÊÇ 40*100 *5ms¾ÍÓÐ20ÃëÁË      ÕâÀïÔÝÖ±½Ó¸Ä³É2£¬ 2025/12/30
-                                       if(wrench_device.rotate_stop_count ++> 2 /*ROTATE_STOP_NUM_5MS*/)                      //Èç¹û¼ÆÊý³¬¹ý2,¼´Á¬ÐøÈý´Î¶¼´ïµ½Óû§É趨ѹÁ¦µÄ90%±íʾ³É¹¦
+                                       if(wrench_device.rotate_stop_count ++> (2*5) /*ROTATE_STOP_NUM_5MS*/)                      //Èç¹û¼ÆÊý³¬¹ý2,¼´Á¬ÐøÈý´Î¶¼´ïµ½Óû§É趨ѹÁ¦µÄ90%±íʾ³É¹¦
                                        {
                                                wrench_device.rotate_stop_count = 0;                       //ÇåÁã
                                                //Flash_RecordData();
@@ -613,7 +613,7 @@ void WrenchManage_MainTask(void)                              //״̬
        else if( target_pressure >0.0 )
                finish_compareFac = 0.90; //2BarÒÔϰ´%90¼ì²â
 #else
-       finish_compareFac = 0.80; //2BarÒÔϰ´%90¼ì²â
+       // finish_compareFac = 0.80; //2BarÒÔϰ´%90¼ì²â
 #endif 
 
        //ret = WrenchMode_Select(ModifyVarStructVar.WorkMode);        //ģʽѡÔñ