Closed jo-bru closed 3 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.
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.
As discussed in #6 I created the
protobuf_helper
to make the protobuf handling more cleaner:String fields inside feedback messages are handled by the callback function
encode_string
String fields inside
oneof
messages are harder to handle. Therefore it's only possible to use String fields inside aoneof
message with a fixed maximum size. To define the maximum size of a field, theline_protocol.options
file has to be used.To be able to test the implemented code on the MCU, I updated the
controller_test.py
file:for each profile type/driver a profile class is used which inherits from the parent class
Profile
since I'm no very experienced with python, we may have to discuss how the python part should be structured next Wed
Other small changes are:
run
option in Makefile to automate building, uploading and executioncreated
/tool
dir for templatesfixed small bug in
main.cpp
: (forgotbreak
inside switch case )