luojunhui_branch
luojunhui 1 year ago
parent f99d8669a4
commit 478c6ca51a

@ -12,14 +12,14 @@ static NEARDATA int utcnt, utpnt;
static NEARDATA coord utrack[UTSZ]; static NEARDATA coord utrack[UTSZ];
void void
initrack(void) /* This function initializes the aaaa tracking system by setting the values of utcnt and utpnt to 0. */ initrack(void) /* 初始化路径*/
{ {
utcnt = utpnt = 0; utcnt = utpnt = 0;
} }
/* add to track */ /* add to track */
void void
settrack(void)/* This function adds a coordinate to the tracking system by updating the values of utcnt and utpnt accordingly. */ settrack(void)/* 添加路径 */
{ {
if (utcnt < UTSZ) if (utcnt < UTSZ)
utcnt++; utcnt++;
@ -31,7 +31,7 @@ settrack(void)/* This function adds a coordinate to the tracking system by updat
} }
coord * coord *
gettrack(coordxy x, coordxy y)/* This function retrieves coordinate from the tracking system based on the given x and y coordinates. It returns a pointer to the coord structure if a match is found; otherwise, it returns NULL. */ gettrack(coordxy x, coordxy y)/* 寻找路径 */
{ {
register int cnt, ndist; register int cnt, ndist;

Loading…
Cancel
Save