feat: Add rfid feature and .gitignore file

This commit is contained in:
lmx
2025-11-27 13:28:00 +08:00
parent 4af4f13ac6
commit f8c8b1ec8a
83 changed files with 145652 additions and 178823 deletions

View File

@ -6,6 +6,8 @@
#include "tone_player.h"
#include "ui_manage.h"
#include "gpio.h"
#include <math.h>
#include <string.h>
#include "app_main.h"
#include "asm/charge.h"
#include "update.h"
@ -24,6 +26,8 @@
#include "./sensor/MMC56.h"
#include "./sensor/BMP280.h"
#include "./sensor/AK8963.h"
#include "asm/rtc.h"
#include "system/timer.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
//宏定义
#define ENABLE_XLOG 1
@ -64,6 +68,9 @@ typedef struct {
// -- 气压计 --
int adc_P;
int adc_T;
// -- 左/右腿 --
uint8_t foot; //1左脚2右脚
} BLE_send_data_t;
static int count = 0;
@ -166,6 +173,7 @@ void start_collect_fuc(void){
// xlog("=======sensor_read_data END\n");
}
/**
@ -290,7 +298,7 @@ void BLE_send_fuc(void){
}
}
static u8 bmp280_test_id = 0;
void xtell_task_create(void){
#if TCFG_GSENOR_USER_IIC_TYPE
@ -311,15 +319,9 @@ void xtell_task_create(void){
circle_buffer_init(&BLE_send_buff, BLE_send_data, SENSOR_DATA_BUFFER_SIZE, sizeof(BLE_send_data_t));
bmp280_init();
extern void bmp280_test(void);
xlog("barometer start measeure\n");
// create_process(&bmp280_test_id,"bmp280_test",NULL, bmp280_test, 100);
float Temp = 0;
float Press = 0;
xlog("test_func\n");
bmp280_read_data(&Temp, &Press);
xlog("Temp:%.2f, Press:%.2f\n",Temp,Press);
}
@ -330,4 +332,40 @@ void xtell_task_create(void){
void bmp280_test(void){
}
void gsensor_test(void){
// static signed short combined_raw_data[6];
// static int initialized = 0;
// static int calibration_done = 0;
// char status = 0;
// BLE_send_data_t BLE_send_data_tmp;
// signed short acc_data_buf[3];
// signed short gyr_data_buf[3];
// float angle[3];
// float quaternion_output[3];
// // -- 读数据 --
// SL_SC7U22_RawData_Read(acc_data_buf,gyr_data_buf);
// memcpy(&combined_raw_data[0], acc_data_buf, 3 * sizeof(signed short));
// memcpy(&combined_raw_data[3], gyr_data_buf, 3 * sizeof(signed short));
// // -- 四元数 --
// status = Q_SL_SC7U22_Angle_Output(0, combined_raw_data, angle,NULL, 0, quaternion_output);
// // -- 速度计算 --
// memcpy(acc_data_buf, &combined_raw_data[0], 3 * sizeof(signed short));
// memcpy(gyr_data_buf, &combined_raw_data[3], 3 * sizeof(signed short));
// uint16_t speed = sensor_processing_task(acc_data_buf,gyr_data_buf,angle, quaternion_output);
#if 1
if(count >= 5){
xlog("==============time============\n");
u32 current_ms = sys_timer_get_ms();
xlog("====== current system time: %u ms\n", current_ms);
count = 0;
}
count++;
#endif
}