From 368f1d8d7df81e3b1354ee992430571d07816c4f Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期五, 19 四月 2024 14:56:06 +0800 Subject: [PATCH] V2.5,限制基站数量最大8个 --- APL/App.c | 46 ++++++++++++++++++++++++---------------------- 1 files changed, 24 insertions(+), 22 deletions(-) diff --git a/APL/App.c b/APL/App.c index 4440981..777ee59 100644 --- a/APL/App.c +++ b/APL/App.c @@ -57,7 +57,7 @@ static HIDO_UINT32 l_u32LocationTick = 0; extern ST_GPS l_stGPS; extern uint32_t uwbled,gpsled,loraled,powerled; -uint8_t uwb_send[100]={0x55,0xaa}; +uint8_t uwb_send[200]={0x55,0xaa}; void Uwb_Zubao_Poll(); extern IWDG_HandleTypeDef hiwdg; /******************************************************************************* @@ -231,7 +231,7 @@ //deca_sleep(1000); g_com_map[GROUP_ID]=3; - g_com_map[VERSION] = (2<<8)|4; + g_com_map[VERSION] = (2<<8)|5; if (g_com_map[COM_INTERVAL] <50) { @@ -291,24 +291,24 @@ printf("服务器地址: %d.%d.%d.%d:%d.\r\n",g_com_map[IP_0],g_com_map[IP_1],g_com_map[IP_2],g_com_map[IP_3],g_com_map[PORT]); printf("当前运动时GPS工作间隔: %d .\r\n",g_com_map[GPS_HZ]); printf("当前被拆时GPS工作间隔: %d .\r\n",g_com_map[CHAICHUGPS_HZ]); - if(g_com_map[RTCMMODE_INDEX] == RTCMMODE_TCP) - { printf("TCP_RTCM模式,服务器地址: %d.%d.%d.%d:%d.\r\n",g_com_map[TCP_IP_0],g_com_map[TCP_IP_1],g_com_map[TCP_IP_2],g_com_map[TCP_IP_3],g_com_map[TCP_PORT]); - }else if(g_com_map[RTCMMODE_INDEX] == RTCMMODE_NTRIP) - { -// sprintf((char *)&g_com_map[NTRIP_HOST_INDEX],"140.143.212.42"); -// g_com_map[NTRIP_PORT_INDEX] = 8005; -// sprintf((char *)&g_com_map[NTRIP_USERNANME_INDEX],"test006"); -// sprintf((char *)&g_com_map[NTRIP_PASSWORD_INDEX],"hxzk20151102"); -// sprintf((char *)&g_com_map[NTRIP_SOURCENAME_INDEX],"RTCM32_GNSS2"); - printf("NtripHost:%s.\r\n",(char *)&g_com_map[NTRIP_HOST_INDEX]); - printf("NtripPort:%d.\r\n",g_com_map[NTRIP_PORT_INDEX]); - printf("NtripUsername:%s.\r\n",(char *)&g_com_map[NTRIP_USERNANME_INDEX]); - printf("NtripPassword:%s.\r\n",(char *)&g_com_map[NTRIP_PASSWORD_INDEX]); - printf("NtripSourcename:%s.\r\n",(char *)&g_com_map[NTRIP_SOURCENAME_INDEX]); - }else if(g_com_map[RTCMMODE_INDEX] == RTCMMODE_NONE) - { - printf("单点定位模式模式. \r\n"); - } +// if(g_com_map[RTCMMODE_INDEX] == RTCMMODE_TCP) +// { printf("TCP_RTCM模式,服务器地址: %d.%d.%d.%d:%d.\r\n",g_com_map[TCP_IP_0],g_com_map[TCP_IP_1],g_com_map[TCP_IP_2],g_com_map[TCP_IP_3],g_com_map[TCP_PORT]); +// }else if(g_com_map[RTCMMODE_INDEX] == RTCMMODE_NTRIP) +// { +//// sprintf((char *)&g_com_map[NTRIP_HOST_INDEX],"140.143.212.42"); +//// g_com_map[NTRIP_PORT_INDEX] = 8005; +//// sprintf((char *)&g_com_map[NTRIP_USERNANME_INDEX],"test006"); +//// sprintf((char *)&g_com_map[NTRIP_PASSWORD_INDEX],"hxzk20151102"); +//// sprintf((char *)&g_com_map[NTRIP_SOURCENAME_INDEX],"RTCM32_GNSS2"); +// printf("NtripHost:%s.\r\n",(char *)&g_com_map[NTRIP_HOST_INDEX]); +// printf("NtripPort:%d.\r\n",g_com_map[NTRIP_PORT_INDEX]); +// printf("NtripUsername:%s.\r\n",(char *)&g_com_map[NTRIP_USERNANME_INDEX]); +// printf("NtripPassword:%s.\r\n",(char *)&g_com_map[NTRIP_PASSWORD_INDEX]); +// printf("NtripSourcename:%s.\r\n",(char *)&g_com_map[NTRIP_SOURCENAME_INDEX]); +// }else if(g_com_map[RTCMMODE_INDEX] == RTCMMODE_NONE) +// { +// printf("单点定位模式模式. \r\n"); +// } } void IdleTask(void) @@ -375,7 +375,8 @@ uint16_t state_flag; u16 uwbchecksum; state_flag=fangchai_flag<<4; - + if(taglist_num>8) + {taglist_num=8;} uwb_send[2] = 0x12;//正常模式 uwb_send[3] = 15+5*(taglist_num);//数据段长度 memcpy(&uwb_send[4],&dev_id,2); @@ -390,7 +391,8 @@ uwb_send[14] = 0; uwb_send[15] = 0; uwb_send[16] = taglist_num; - + if(taglist_num>7) + {taglist_num=7;} memcpy(&uwb_send[17],&tagid_list,2*taglist_num); memcpy(&uwb_send[17+taglist_num*2],&tagdist_list,2*taglist_num); memcpy(&uwb_send[17+taglist_num*4],&tagbat_list,taglist_num); -- Gitblit v1.9.3