2024/1/25飞行测试

This commit is contained in:
2024-01-26 15:31:40 +08:00
parent 9be12234ec
commit 08cbf4ba74
5 changed files with 80 additions and 20 deletions

View File

@ -5,11 +5,12 @@
#include "usart_ano.h"
unsigned char Data_Buff[32] ={0XAA,0XFF,0XF1};
//AA FF F1 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 AA 37
void Data_send(int32_t _a,int32_t _b,int32_t _c,int32_t _d)
void Data_send(int32_t _a,int32_t _b)
{
unsigned char i,cnt=4;
unsigned char sc=0,ac=0;
Data_Buff[3]=0x08;
Data_Buff[cnt++] = BYTE0(_a);
Data_Buff[cnt++] = BYTE1(_a);
Data_Buff[cnt++] = BYTE2(_a);
@ -20,19 +21,6 @@ void Data_send(int32_t _a,int32_t _b,int32_t _c,int32_t _d)
Data_Buff[cnt++] = BYTE2(_b);
Data_Buff[cnt++] = BYTE3(_b);
Data_Buff[cnt++] = BYTE0(_c);
Data_Buff[cnt++] = BYTE1(_c);
Data_Buff[cnt++] = BYTE2(_c);
Data_Buff[cnt++] = BYTE3(_c);
Data_Buff[cnt++] = BYTE0(_d);
Data_Buff[cnt++] = BYTE1(_d);
Data_Buff[cnt++] = BYTE2(_d);
Data_Buff[cnt++] = BYTE3(_d);
Data_Buff[3]=cnt-4;
for(i=0;i<cnt;i++)
{
sc+=Data_Buff[i];