From dca85b651a942c826f1b29ac08d7e65d33cebb93 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期四, 22 十月 2020 12:02:16 +0800
Subject: [PATCH] 可以读取气压温度

---
 Src/main.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Src/main.c b/Src/main.c
index a0b6624..d6e3452 100644
--- a/Src/main.c
+++ b/Src/main.c
@@ -123,9 +123,9 @@
 //	LED_TR_OFF;
 	current_time=GetLPTime();
 	//motor_state=2;
-		if(g_com_map[MOTOR_ONTIME]>0)
+		if(g_com_map[MOTOR_ONTIME_INDEX]>0)
 	{
-		g_com_map[MOTOR_ONTIME]--;
+		g_com_map[MOTOR_ONTIME_INDEX]--;
 		motor_state = 1;
 	}
 	switch(motor_state)
@@ -303,6 +303,7 @@
 uint32_t temp;
 extern uint8_t sleep_flag,m_bEUARTTxEn;
 uint16_t waitusart_timer;
+extern double pressure,temperature; 
 //void HAL_UART_RxCpltCallback(UART_HandleTypeDef *UartHandle)
 //{
 //  /* Set transmission flag: trasfer complete*/
@@ -354,6 +355,7 @@
 	LED_LG_ON;
 	Program_Init();
 	LIS3DH_Data_Init();	
+	BarInit();
 	Dw1000_Init();
 	Dw1000_App_Init();
 	
@@ -383,7 +385,7 @@
 	{ static uint16_t blink_count=0;
 		SystemClock_Config();
 		g_start_send_flag = 0;	
-		
+		 GetPressAndTemp();
 //		if(current_count>slot_startcount&&current_count<slot_startcount+interval_count)
 //		{
 //		HAL_GPIO_WritePin(LED0_GPIO, GPIO_PIN_9, GPIO_PIN_SET);

--
Gitblit v1.9.3