fedetft / serial-port

A set of C++ classes to easiliy handle serial ports across different platforms, built on top of boost.asio.
http://www.webalice.it/fede.tft/serial_port/serial_port.html
230 stars 86 forks source link

Asynchronous read not work #5

Open fatalerror8787 opened 3 years ago

fatalerror8787 commented 3 years ago

I'm new in C++.

My embeded sensor send character like this Roll=5.413759 Pitch=16.861174 Yaw=175.750381 Acceleration: X=-3294 Y=-44 Z=2463 Gyroscope: X=-1 Y=0 Z=-1 Magnetic: X=45 Y=23 Z=-65 END

Roll=6.413759 Pitch=17.861174 Yaw=176.750381 Acceleration: X=-3294 Y=-44 Z=2463 Gyroscope: X=-1 Y=0 Z=-1 Magnetic: X=45 Y=23 Z=-65 END

I use example 1, asio::read, is OK. I change to example 3 or 4, asychronous read, the console is always blank. It could input, but receive noting. Any suggestion, thanks in advance. temp

fedetft commented 3 years ago

What's in your receive callback?