Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ارسال مختصات بدست آمده از پورت سریال #1

Open
mhsh68y opened this issue Apr 23, 2019 · 5 comments
Open

Comments

@mhsh68y
Copy link

mhsh68y commented Apr 23, 2019

سلام
خیلی ممنون از سورسی که قرار دادید.
من با دستور زیر می تونم کل خروجی مکانیاب را که با پورت سریال3 به میکرو ارسال می شه را از طریق پورت سریال 2 به رایانه ارسال کنم.
HAL_UART_Transmit(&huart2,GPS.rxBuffer,sizeof(GPS.rxBuffer),500);

ولی نمی تونم طول و عرض جغرافیایی تبدیل شده را روی پورت سریال2 به تنهایی ارسال کنم.

منظور GPS.GPGGA.LatitudeDecimal و GPS.GPGGA.LongitudeDecimal است.

لطفا راهنمایی بفرمایید.

@nimaltd
Copy link
Owner

nimaltd commented Apr 23, 2019 via email

@mhsh68y
Copy link
Author

mhsh68y commented Apr 23, 2019

من کد زیر را استفاده کردم ولی جواب نگرفتم
char mybuff[50];
.
.
.
sprintf(mybuff,"%S",GPS.GPGGA.LatitudeDecimal);
HAL_UART_Transmit(&huart2,(uint8_t*)mybuff,sizeof(mybuff),30);

@nimaltd
Copy link
Owner

nimaltd commented Apr 23, 2019 via email

@mhsh68y
Copy link
Author

mhsh68y commented Apr 26, 2019

salam,mamnoon az komaketoon. moshkele asli az str=strstr((char*)GPS.rxBuffer,"$GPGGA,"); bood k bayad b jaye $GPGGA az $GNGGA estefade mikardam. ehtemalan too majol gps man intori boode. alan dorost shod.bazam mamnoon.

@nimaltd
Copy link
Owner

nimaltd commented Apr 26, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants