B4X FEED Serial communication with timer

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: Serial communication with timer است. این موضوع تا کنون 142 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع Serial communication with timer
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
142
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
I have an app that is receiving data from an altimeter.
The altimeter is sending packages of 404 bytes.
The first 4 bytes contain information about the total number of packages to expect and the actual package number.
The rest is alti data.
On connection, the altimeter sends 14 bytes containing info about ID, battery voltage, etc, immediately followed by the first package of 404.
Reception of this package is confirmed by sending a code back to the altimeter, which in return sends the following package.
A timer is set at 1000ms. If the next package is not received, the tick event sends a message, asking to repeat the transmission.
This request is repeated max three times. When still unsuccessful, the connection is cut.
Sometimes this works and I do receive up to 100 packages and more, sometimes it dies in the timer_tick event.
Any Ideas?

B4X:

کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید

B4X:

Sub Bluetooth_serial_Connected (Success As...



 

عقب
بالا