zhyinch
2018-10-18 161e0e819bd319abb94b1030f3ab2e1711311ac8
配对完成,有bug
已修改5个文件
18 ■■■■■ 文件已修改
源码/核心板/Src/application/beep_logic_app.c 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/application/dw_app.c 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/application/dw_app.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/main.c 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/stm32f10x_it.c 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Ô´Âë/ºËÐİå/Src/application/beep_logic_app.c
@@ -12,6 +12,7 @@
#define ONTIME3 1   // 500ms
#define OFFTIME3 5  // 500ms
void main_logic(void)    //主逻辑在这里执行
{
    static uint8_t beep_state,timer_state,beep_timer,beep_ontime,beep_offtime;
Ô´Âë/ºËÐİå/Src/application/dw_app.c
@@ -31,7 +31,7 @@
#include "global_param.h"
#include "filters.h"
#include <stdio.h>
#include "beep.h"
/*------------------------------------ Marcos ------------------------------------------*/
@@ -502,6 +502,8 @@
                        g_pairstart=0;
                        g_com_map[PAIR_ID]=tag_id_recv;
                        save_com_map_to_flash();
                        BEEP2_ON;
                        delay_ms(1000);
                        printf("Pair Finish PairID: %d. \r\n",g_com_map[PAIR_ID]);
                    }
                    g_flag_Taggetdist[tag_id_recv]=0;
Ô´Âë/ºËÐİå/Src/application/dw_app.h
@@ -5,6 +5,9 @@
#include "stm32f10x.h"
#include "filters.h"
#define WORK_MODE_TAG
//#define WORK_MODE_ANCHOR
#define TAG_NUM_IN_SYS                256
#define DFT_RAND_DLY_TIM_MS            1
Ô´Âë/ºËÐİå/Src/main.c
@@ -10,8 +10,7 @@
#include "serial_at_cmd_app.h"
#include "global_param.h"
#define WORK_MODE_TAG
//#define WORK_MODE_ANCHOR
void Device_Init(void)
{
Ô´Âë/ºËÐİå/Src/stm32f10x_it.c
@@ -34,6 +34,7 @@
uint8_t g_start_send_flag = 0;
uint16_t sysscal;
extern uint16_t g_Resttimer;
extern uint8_t g_pairstart;
void SysTick_Handler(void)
{uint16_t i;
  time32_incr++;
@@ -46,9 +47,11 @@
//    {    
//        dis_after_filter = DEFAULT_DISTANCE;
//    }
#ifdef WORK_MODE_ANCHOR
TagDistClear();
    if(g_pairstart!=1)
    main_logic();
#endif
}
@@ -74,8 +77,6 @@
    g_start_send_flag = 1;
    RTC_SET_ALARM(1);
    tt++;
  //SYS.wake_id|=1<<17;
}
void USART1_IRQHandler(void)