Comments (7)
Created pull request, still not sure what is wrong with client_read_test
from msp.
Thanks for your contribution.
In the end, I replaced all uint
with size_t
to be more standard compliant. Can you checkout branch win_build
, which contains these changes, and check if it still works for you?
from msp.
branch win_build
still works, although client_read_test
still blocks.
I'm not very familiar with asio, but I suspect it might because the serial port isn't closed before the Client
thread is joined, so asio::read_until(port, buffer, "$M");
never returns.
from msp.
asio::read_until
blocks and that is why thread
can never join at the end of client_read_test
, e.g. after all responses have been received. In client_async_test
it is working since the background thread is still sending (and receiving) messages, which unblock asio::read_until
.
I pushed an update that detaches from the thread instead of waiting for the result. This should prevent blocking of the program.
from msp.
I don't think detaching the thread is the thing to do, because now fcu_test crashes on exit because the Client
thread keeps running even after Client
has been destroyed, and tries to access deallocated objects.
from msp.
Thanks for the fixes in PR #12. I am wondering if there are more of these kind of issues (improper deallocation of members at destruction of objects) and if there is a good way of systematically discovering them with tests.
from msp.
I don't have much experience writing robust code, but it is my intuition is that tests won't uncover unexpected edge cases, because they are never thought to test for (the unknown unknowns). I don't have any experience with it, but perhaps a tool like valgrind could help? Another idea might be to add in asserts to expose when basic assumptions are violated?
from msp.
Related Issues (20)
- How to verify feature RX_MSP for my board HOT 3
- How to write CLI commands to eeprom HOT 2
- running example programs against INAV 2.0.1 firmware on Revo HOT 14
- Can't compile version 3.0.0 on Windows HOT 4
- Can't use MSP on quadrino HOT 16
- g++ failing after linking with -lmsp_fcu -lmspclient. HOT 8
- Having trouble reaching desired read speeds HOT 2
- EOF when running client_read_test HOT 6
- Fatal exception on website HOT 2
- Build works fine but compilation gives error HOT 11
- wrong scaling of raw values in messages HOT 3
- How to send waypoint to my flight card ? HOT 23
- I have not tested the `MSP_SET_WP` message before. If you provide a minimal source example to reproduce this issue (as plain text, not screenshots of text) I can try to reproduce this in my Betaflight setup. HOT 3
- Omnibus F4 Pro V3 with betaflight and raspberry pi MSP HOT 7
- what(): read: End of file, Segmentation Fault on running client_read_test HOT 1
- Issue MSP communication Arduino Leonardo
- Problems with transmitting control commands from the computer to the FC. HOT 1
- timeout for fcu.connect() never happens when no FCU is hooked up HOT 2
- cannot connect to betaflight fcs HOT 39
- SetRc() only works for half a second with Betaflight MSP_OVERRIDE mode HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msp.