-
Notifications
You must be signed in to change notification settings - Fork 0
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
Initialise NUSense -> NUC communication protocol #3
Conversation
Don't commit generated code, generate it on the fly instead |
@TrentHouliston that would probably involve the whole nanopb repo/build to be included somewhere in the tools section in NUbots/NUbots then use subprocess to run the generator script then probs use firmware installer to write the files to NUsense. Is this how you expect this to go? The pb.cc and pb.h counterparts of a normal pb message have to be in NUSense for the code to compile in that side if we're going with this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some TODOs need to be done for it to work iteratively. This will currently only work if the buffer is not exceeded.
TODO add callback function to extract ServoTarget field from ServoTargets update: Not needed, just went with the .options file route so we can just treat our targets buffer as a vanilla c array |
… with ten bytes of zeroes, another where the memcpy was overflowing. This should work mostly fine at 100 Hz.
…ss. Changed the global variables relevant for the protobuf-handling to volatile. Changed some of the memcpy's to std::copy's as a result. Works under the optimiser set at -Ofast.
debug folder name is used in OpenCR
Might have to bring some of the necessary .cproject files, etc., it is very inconvenient to not be able to build after initial setup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me.
Written the test, next TODO is to decode the packets that are coming from the NUC, encode status returns in NUSense and send to NUC then decoding in the NUC side