Skip to content
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

Merged
merged 27 commits into from
Mar 28, 2024

Conversation

JohanneMontano
Copy link
Contributor

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

@TrentHouliston
Copy link
Member

Don't commit generated code, generate it on the fly instead

@jpptm
Copy link

jpptm commented Sep 29, 2023

@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.

Copy link

@jpptm jpptm left a 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.

NUsenseCpp/USB_DEVICE/App/usbd_cdc_if.c Outdated Show resolved Hide resolved
NUsenseCpp/USB_DEVICE/App/usbd_cdc_if.c Outdated Show resolved Hide resolved
jpptm
jpptm previously requested changes Dec 3, 2023
NUsenseCpp/Core/Src/test_hw.hpp Outdated Show resolved Hide resolved
@jpptm
Copy link

jpptm commented Dec 23, 2023

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

JohanneMontano and others added 10 commits January 12, 2024 15:06
… 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
@JohanneMontano
Copy link
Contributor Author

Might have to bring some of the necessary .cproject files, etc., it is very inconvenient to not be able to build after initial setup.

@JohanneMontano JohanneMontano changed the title Initialise NUSense <-> NUC communication protocol Initialise NUSense -> NUC communication protocol Mar 22, 2024
Copy link
Contributor

@Claegtun Claegtun left a 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.

@JohanneMontano JohanneMontano merged commit 71fffdc into main Mar 28, 2024
@JohanneMontano JohanneMontano deleted the montano/NUsense-NUC-comms branch March 28, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants