Interactions-HSG / uArm-Controller

MIT License
1 stars 0 forks source link

Dev/protobuf helper #11

Closed jo-bru closed 3 years ago

jo-bru commented 4 years ago

As discussed in #6 I created the protobuf_helper to make the protobuf handling more cleaner:

To be able to test the implemented code on the MCU, I updated the controller_test.py file:

Other small changes are:

jo-bru commented 4 years ago

a bit groovy use of Phony targets in Makefile

I created two scripts for these tasks in the /tools dir and updated the README file accordingly.

  • Also in Python [module]_test.py often indicates it's a unit test file for [module].py. I propose to rename the file :-)

renamed the file to simple_gateway. I'm still not quite happy with this name, but I didn't find anything better...maybe later I'll find something that fits better...

About the styling conventions: I'll have a look at it and will make it a bit cleaner :)

  • Another trivial stuff – every POSIX file should end with a new line.

Added this to the VS code settings. Hopefully, it works now automatically.

  • I insist on shifting to “Merged Header Placement”

Yes, I see that. I'll move all header files to the `/src' dir. Since the cpp project is not that big, it should be clear enough like that.

  • Can you elaborate on why do you have public/private pseudo scopes in the protobuf_helper?

These "Public Functions/Private Functions" comment headers are only to structure the code. functions defined in the section public functions are declared in the header file and therefore usable outside of the protobuf_helper. Functions defined in the section "private functions" are declared in the source file and therefore only used within the protobuf_helper.

  • but will you implement the custom encoder/decoder for the oneof Enum fields and parameters instead of the current version?

I'm not sure if I understand you correctly. But I think the Enum handling with the generated structs is quite easy to handle and does not use too much space.

jo-bru commented 3 years ago

I have pushed all of my changes. I'm still struggling to integrate the formatter and linter into VS code. So the code is not yet well structured/commented.