Open-Agriculture / AgIsoStack-plus-plus

AgIsoStack++ is the completely free open-source C++ ISOBUS library for everyone
https://agisostack.com/
MIT License
187 stars 41 forks source link

[VT] Wait on response before processing next command #380

Closed GwnDaan closed 9 months ago

GwnDaan commented 10 months ago

To comply with the standard, we must wait for responses from the VT server before sending the next command. This PR implements that behaviour

GwnDaan commented 10 months ago

The main branch is currently failing to build on PlatformIO: https://github.com/Open-Agriculture/AgIsoStack-plus-plus/actions/runs/7147251833/job/19466433156. This PR will also fix that

ad3154 commented 10 months ago

Tested this by re-basing the seeder example on your branch, and... it's a little slow, only around 20 messages per second. Our update rate of the interface means that after a response is received we have to wait a fair bit before sending the next message which causes some noticeable lag. I am wondering if we should explore options to send the next message on-response.

Some ideas:

https://github.com/Open-Agriculture/AgIsoStack-plus-plus/assets/10929341/ccdb725d-d1ef-4db6-97b9-8dc1bc78e172

GwnDaan commented 10 months ago

I opted for the mutex because I feel like it's the most efficient one, good that you tested this. I didn't have the environment to notice it

sonarcloud[bot] commented 9 months ago

Quality Gate Failed Quality Gate failed

Failed conditions

64.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud