This commit is contained in:
hehaoyang 2023-12-14 14:03:38 +08:00
parent edf95ec041
commit 61abe568b4
4 changed files with 15 additions and 225 deletions

228
.gitignore vendored
View File

@ -1,222 +1,8 @@
WpfApp1/.vs/WpfApp1/FileContentIndex/7ce5a04a-68b0-4b93-a3a9-5ba64bbb8303.vsidx
WpfApp1/.vs/WpfApp1/v16/.suo
WpfApp1/.vs/WpfApp1/v17/.suo
WpfApp1/.vs/WpfApp1/v17/Preview/Browse.VC.db
WpfApp1/WpfApp1/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
WpfApp1/WpfApp1/obj/Debug/App.g.cs
WpfApp1/WpfApp1/obj/Debug/App.g.i.cs
WpfApp1/WpfApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache
WpfApp1/WpfApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
WpfApp1/WpfApp1/obj/Debug/MainWindow.baml
WpfApp1/WpfApp1/obj/Debug/MainWindow.g.cs
WpfApp1/WpfApp1/obj/Debug/MainWindow.g.i.cs
WpfApp1/WpfApp1/obj/Debug/SeniorWindow.g.i.cs
WpfApp1/WpfApp1/obj/Debug/WpfApp1_MarkupCompile.cache
WpfApp1/WpfApp1/obj/Debug/WpfApp1_MarkupCompile.i.cache
WpfApp1/WpfApp1/obj/Debug/WpfApp1.csproj.AssemblyReference.cache
WpfApp1/WpfApp1/obj/Debug/WpfApp1.csproj.CoreCompileInputs.cache
WpfApp1/WpfApp1/obj/Debug/WpfApp1.csproj.FileListAbsolute.txt
WpfApp1/WpfApp1/obj/Debug/WpfApp1.csproj.GenerateResource.cache
WpfApp1/WpfApp1/obj/Debug/WpfApp1.csproj.SuggestedBindingRedirects.cache
WpfApp1/WpfApp1/obj/Debug/WpfApp1.exe
WpfApp1/WpfApp1/obj/Debug/WpfApp1.g.resources
WpfApp1/WpfApp1/obj/Debug/WpfApp1.pdb
WpfApp1/WpfApp1/obj/Debug/WpfApp1.Properties.Resources.resources
WpfApp1/WpfApp1/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
WpfApp1/WpfApp1/bin/Debug/WpfApp1.exe
WpfApp1/WpfApp1/bin/Debug/WpfApp1.exe.config
WpfApp1/WpfApp1/bin/Debug/WpfApp1.pdb
GD32F103C8T6/App/Output/Debug/Exe/App.bin
GD32F103C8T6/App/Output/Debug/Exe/App.elf
GD32F103C8T6/App/Output/Debug/Exe/App.hex
GD32F103C8T6/App/Output/Debug/Exe/App.ind
GD32F103C8T6/App/Output/Debug/Exe/App.map
GD32F103C8T6/App/Output/Debug/Obj/App/ak517.d
GD32F103C8T6/App/Output/Debug/Obj/App/ak517.o
GD32F103C8T6/App/Output/Debug/Obj/App/api.d
GD32F103C8T6/App/Output/Debug/Obj/App/api.o
GD32F103C8T6/App/Output/Debug/Obj/App/app.d
GD32F103C8T6/App/Output/Debug/Obj/App/app.o
GD32F103C8T6/App/Output/Debug/Obj/App/can_parsing.d
GD32F103C8T6/App/Output/Debug/Obj/App/can_parsing.o
GD32F103C8T6/App/Output/Debug/Obj/App/can.d
GD32F103C8T6/App/Output/Debug/Obj/App/can.o
GD32F103C8T6/App/Output/Debug/Obj/App/delay.d
GD32F103C8T6/App/Output/Debug/Obj/App/delay.o
GD32F103C8T6/App/Output/Debug/Obj/App/diaodu.d
GD32F103C8T6/App/Output/Debug/Obj/App/diaodu.o
GD32F103C8T6/App/Output/Debug/Obj/App/fmc.d
GD32F103C8T6/App/Output/Debug/Obj/App/fmc.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_adc.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_adc.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_bkp.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_bkp.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_can.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_can.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_crc.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_crc.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_dac.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_dac.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_dbg.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_dbg.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_dma.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_dma.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_enet.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_enet.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_exmc.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_exmc.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_exti.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_exti.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_fmc.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_fmc.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_fwdgt.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_fwdgt.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_gpio.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_gpio.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_i2c.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_i2c.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_md_Vectors.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_md_Vectors.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_misc.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_misc.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_pmu.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_pmu.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_rcu.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_rcu.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_rtc.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_rtc.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_sdio.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_sdio.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_spi.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_spi.o
GD32F103C8T6/App/Output/Debug/Obj/App/GD32F10x_Startup.d
GD32F103C8T6/App/Output/Debug/Obj/App/GD32F10x_Startup.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_timer.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_timer.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_usart.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_usart.o
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_wwdgt.d
GD32F103C8T6/App/Output/Debug/Obj/App/gd32f10x_wwdgt.o
GD32F103C8T6/App/Output/Debug/Obj/App/gpio.d
GD32F103C8T6/App/Output/Debug/Obj/App/gpio.o
GD32F103C8T6/App/Output/Debug/Obj/App/iap.d
GD32F103C8T6/App/Output/Debug/Obj/App/iap.o
GD32F103C8T6/App/Output/Debug/Obj/App/iic.d
GD32F103C8T6/App/Output/Debug/Obj/App/iic.o
GD32F103C8T6/App/Output/Debug/Obj/App/ir.d
GD32F103C8T6/App/Output/Debug/Obj/App/ir.o
GD32F103C8T6/App/Output/Debug/Obj/App/m62429.d
GD32F103C8T6/App/Output/Debug/Obj/App/m62429.o
GD32F103C8T6/App/Output/Debug/Obj/App/main.d
GD32F103C8T6/App/Output/Debug/Obj/App/main.o
GD32F103C8T6/App/Output/Debug/Obj/App/qgel50x.d
GD32F103C8T6/App/Output/Debug/Obj/App/qgel50x.o
GD32F103C8T6/App/Output/Debug/Obj/App/SEGGER_THUMB_Startup.d
GD32F103C8T6/App/Output/Debug/Obj/App/SEGGER_THUMB_Startup.o
GD32F103C8T6/App/Output/Debug/Obj/App/setting.d
GD32F103C8T6/App/Output/Debug/Obj/App/setting.o
GD32F103C8T6/App/Output/Debug/Obj/App/spi.d
GD32F103C8T6/App/Output/Debug/Obj/App/spi.o
GD32F103C8T6/App/Output/Debug/Obj/App/system_gd32f10x.d
GD32F103C8T6/App/Output/Debug/Obj/App/system_gd32f10x.o
GD32F103C8T6/App/Output/Debug/Obj/App/system.d
GD32F103C8T6/App/Output/Debug/Obj/App/system.o
GD32F103C8T6/App/Output/Debug/Obj/App/task.d
GD32F103C8T6/App/Output/Debug/Obj/App/task.o
GD32F103C8T6/App/Output/Debug/Obj/App/timer.d
GD32F103C8T6/App/Output/Debug/Obj/App/timer.o
GD32F103C8T6/App/Output/Debug/Obj/App/usart.d
GD32F103C8T6/App/Output/Debug/Obj/App/usart.o
GD32F103C8T6/App/Output/Debug/Obj/App/v58.d
GD32F103C8T6/App/Output/Debug/Obj/App/v58.o
GD32F103C8T6/App/Output/Debug/Obj/App/wdgt.d
GD32F103C8T6/App/Output/Debug/Obj/App/wdgt.o
GD32F103C8T6/Bootloader/Output/Debug/Exe/Bootloader.elf
GD32F103C8T6/Bootloader/Output/Debug/Exe/Bootloader.hex
GD32F103C8T6/Bootloader/Output/Debug/Exe/Bootloader.ind
GD32F103C8T6/Bootloader/Output/Debug/Exe/Bootloader.map
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/delay.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/delay.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_adc.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_adc.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_bkp.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_bkp.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_can.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_can.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_crc.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_crc.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_dac.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_dac.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_dbg.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_dbg.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_dma.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_dma.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_enet.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_enet.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_exmc.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_exmc.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_exti.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_exti.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_fmc.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_fmc.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_fwdgt.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_fwdgt.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_gpio.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_gpio.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_i2c.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_i2c.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_md_Vectors.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_md_Vectors.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_misc.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_misc.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_pmu.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_pmu.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_rcu.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_rcu.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_rtc.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_rtc.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_sdio.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_sdio.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_spi.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_spi.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/GD32F10x_Startup.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/GD32F10x_Startup.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_timer.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_timer.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_usart.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_usart.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_wwdgt.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gd32f10x_wwdgt.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/main.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/main.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/SEGGER_THUMB_Startup.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/SEGGER_THUMB_Startup.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/system_gd32f10x.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/system_gd32f10x.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/task.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/task.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/timer.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/timer.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/usart.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/usart.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/wdgt.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/wdgt.o
GD32F103C8T6/Bootloader/Bootloader_Debug.jlink
GD32F103C8T6/App/App_Debug.jlink
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/fmc.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/fmc.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gpio.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/gpio.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/iap.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/iap.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/setting.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/setting.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/spi.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/spi.o
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/system.d
GD32F103C8T6/Bootloader/Output/Debug/Obj/Bootloader/system.o
GD32F103C8T6/GD32F10x.emSession
WpfApp1/.vs/*
WpfApp1/WpfApp1/obj/*
WpfApp1/WpfApp1/bin/*
GD32F103C8T6/App/Output/*
GD32F103C8T6/Bootloader/Output/*
GD32F103C8T6/._GD32F10x.emProject
GD32F103C8T6/App/Output/Debug/Obj/App/v58-e8e109c7.o.tmp
WpfApp1/.vs/WpfApp1/FileContentIndex/294201ea-13b4-4ce6-87c7-fe11eac372a1.vsidx
协议文档/~$通信协议说明.docx
*.emSession
*.jlink

View File

@ -22,7 +22,7 @@
#define API_FRAME_RESPONSE (0x01) /* 响应帧 */
#define API_FRAME_NOTIFICATION (0x02) /* 通知帧 */
#define SOFTWARE_VERSION ("V1.23")
#define SOFTWARE_VERSION ("V1.24")
#define HARDWARE_VERSION ("V1.01")
extern uint8_t api_upgrade_mode;

View File

@ -14,7 +14,7 @@ static uint64_t diaodu_status_rx_timestamp = 0;
static uint8_t door_front_status = 1, door_front_status_temporary = 1;
static uint8_t door_back_status = 1, door_back_status_temporary = 1;
static uint8_t door_status = 1, door_status_temporary = 2;
static uint8_t door_status = 2, door_status_temporary = 2;
static uint8_t turn_left_status = 1, turn_left_status_temporary = 1;
static uint8_t turn_left_parsing_count = 0; /* 转向接收次数 */
static uint8_t turn_right_status = 1, turn_right_status_temporary = 1;
@ -532,8 +532,7 @@ static void vehicle_status_parsing_task(uint8_t uuid)
if (door_back_status_temporary != door_back_status)
door_back_status = door_back_status_temporary;
//door_status_temporary = door_front_status_temporary + door_back_status_temporary;
door_status_temporary = door_front_status_temporary | door_back_status_temporary;
door_status_temporary = door_front_status_temporary & door_back_status_temporary;
if (door_status != door_status_temporary)
{

View File

@ -1,5 +1,7 @@
#include "main.h"
static uint32_t can_filter_id[9] = {0x18FED925, 0x18F00503, 0x18FDA589, 0x18FE419B, 0x18F00503, 0x18A70017, 0x18F40117, 0x18F101D0, 0x18FFD117};
static void bsp_initialization(void);
int main(void)
@ -26,6 +28,9 @@ static void bsp_initialization(void)
/* CAN0 初始化, 波特率250 */
can_config(CAN0, 250);
/* CAN0 设置过滤 (允许列表ID通过) */
can_set_filter_by_id(CAN0, can_filter_id, 9);
/* 上位机 通讯串口 初始化 */
usart_config(HOST_USART_PERIPH, 115200, USART_PM_NONE);