Ver código fonte

merge motion

liang 2 anos atrás
pai
commit
166a48a651
1 arquivos alterados com 7 adições e 7 exclusões
  1. 7 7
      app/app_chargerpin_conn_detect.c

+ 7 - 7
app/app_chargerpin_conn_detect.c

@@ -1,4 +1,4 @@
-#include "app_chargerpin_conn_detect.h"
+#include "app_chargerpin_conn_detect.h"
 #include "system.h"
 #include "bsp_time.h"
 #include "bsp_adc.h"
@@ -274,7 +274,7 @@ static void app_pair_host_process(void)
 			case 2:
 			
 				break;
-			case 3://¨¦?¨¤-¨¨?¡ä¨®?¨²¡¤¡é??????D?o?
+			case 3://é?à-è?′ó?ú·¢??????D?o?
 				if ((TIME_GetTicks() - host_ram.delay_pair_count > ADC_CHECKMS+ADC_CHECKMS))
 				{
 					PAIR_CHARGERPIN_PRINT(" UP pull over time  %d \n", TIME_GetTicks());
@@ -284,7 +284,7 @@ static void app_pair_host_process(void)
 					Process_SetHoldOn(app_pair_host_process,0);
 					host_ram.statu=1;
 				}
-				else if(nrf_gpio_pin_read(PIN_CHARGING))//?¨¢¦Ì?¨¦?¨¤-D?o?¨°?o¨®¡ê??¦Ì?¡Âclient¨°??-¨¢??¨®¨¦?
+				else if(nrf_gpio_pin_read(PIN_CHARGING))//?áμ?é?à-D?o?ò?oó£??μ?÷clientò??-á??óé?
 				{
 					PAIR_CHARGERPIN_PRINT(" nrf_gpio_pin_read(PIN_CHARGING SUCCESS \n", TIME_GetTicks());
 					host_ram.statu=4;
@@ -355,7 +355,7 @@ static void app_pair_host_process(void)
 
 
 #define CONN_MAX_ADC 1000
-#define CONN_MIN_ADC 600
+#define CONN_MIN_ADC 750
 void app_pair_client_init(Event into,Event over)
 {
 	client_ram.init=1;
@@ -395,7 +395,7 @@ void app_pair_client_process_case1(void)
 						client_ram.pair_line=CHARGE;
 					}
 				}
-				else if(client_ram.adc_value>CONN_MIN_ADC)
+				else if((client_ram.adc_value>CONN_MIN_ADC)&&(client_ram.adc_value < CONN_MIN_ADC+100))
 				{
 					PAIR_CHARGERPIN_PRINT("CONNECT_NO_CHARGE\n");
 					if(client_ram.pair_line!=CONNECT_NO_CHARGE)
@@ -415,7 +415,7 @@ void app_pair_client_process_case1(void)
 							NRF_GPIO_PIN_D0H1,
 							NRF_GPIO_PIN_NOSENSE);
 						nrf_gpio_cfg_watcher(PIN_CHARGING);
-						nrf_gpio_pin_set(PIN_CHARGING);//¨¤-??100ms
+						nrf_gpio_pin_set(PIN_CHARGING);//à-??100ms
 						
 						client_ram.delay_pair_count=TIME_GetTicks();
 						Process_UpdatePeroid(app_pair_client_process,1);
@@ -475,7 +475,7 @@ static void app_pair_client_process(void)
 	
 				break;
 			case 2:
-				if(TIME_GetTicks() - client_ram.delay_pair_count > 100)//¦Ì¨¨100ms
+				if(TIME_GetTicks() - client_ram.delay_pair_count > 100)//μè100ms
 				{
 					nrf_gpio_pin_clear(PIN_CHARGING);
 					client_ram.statu=3;