-
Notifications
You must be signed in to change notification settings - Fork 0
Code generation now doesnt suck :p #64
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
Merged
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
1baff4a
Add argv
Cantonplas 4935f21
Works, i think
Cantonplas 2d7a243
Fix repo name problem
Cantonplas f50722b
Created variable board
Cantonplas 3285604
Merge branch 'Code_generation_fix' into FW-301/Execute_Code_gen_on_cmake
Cantonplas 35fc114
Some changes
Cantonplas 5b167af
Merge branch 'Code_generation_fix' into FW-301/Execute_Code_gen_on_cmake
Cantonplas b9dc5af
Merge branch 'FW-301/Execute_Code_gen_on_cmake' of https://github.com…
Cantonplas e0ffbc2
Changed generator.py and cmakelist, now cmakelist board needs to be m…
Cantonplas 62bf0c4
Merge branch 'main' into FW-301/Execute_Code_gen_on_cmake
Cantonplas ec302cd
Changes on cmake and some tests for making the github actions work
Cantonplas 321ebfd
Testing to delete the results of the generation for github actions
Cantonplas 1e1ca84
The test didnt work again
Cantonplas ab5ee07
Uploaded the folder so that it works
Cantonplas 55f1c66
Merge branch 'main' into FW-301/Execute_Code_gen_on_cmake
Cantonplas 0e82c9f
Temporal changes
Cantonplas 2d4eccb
Changed packet description structure and how it reads adj, works fine
Cantonplas b2fd7be
Deleted generated code
Cantonplas ff301c6
Silly change that makes it so it doesnt explode when you put a wrong …
Cantonplas 69116f1
Merge branch 'main' into FW-301/Execute_Code_gen_on_cmake
Cantonplas 52814b9
Sockets are now created automatically
Cantonplas 623bcc0
Missed a _, now working
Cantonplas 91b8c40
Autogenerated code now creates sockets and send packets on a set peri…
Cantonplas 789ac6e
Working version, testing to be done
Cantonplas f845aa5
Testing in course
Cantonplas ed703ab
New version now creates sockets and sends the packets correctly
Cantonplas 85c1e62
Updated deps
Cantonplas 4c9e8d4
Fixed Order Packets, now working
Cantonplas 485b4fa
Deleted generated code
Cantonplas 2bbf1e9
Update Core/Inc/Code_generation/Packet_generation/Packet_generation.py
Cantonplas 47075b7
Merge remote-tracking branch 'origin/main' into FW-301/Execute_Code_g…
Cantonplas 5c58756
Merge branch 'FW-301/Execute_Code_gen_on_cmake' of https://github.com…
Cantonplas c6aa833
6 months later maybe this time we can aprove this pr
Cantonplas 788b26c
Deleted generated code
Cantonplas 2833d51
Deps update and deleted comments
Cantonplas 01cca43
Merge branch 'main' into FW-301/Execute_Code_gen_on_cmake
Cantonplas 7cb761b
Now it works
Cantonplas 0d8274b
virtual\scripts\python is wrong, also Wpedantic needs to be removed
victor-Lopez25 bb2af32
remove htim* from runes.cpp, I thought I removed this before...
victor-Lopez25 f140ad4
remove virtual/Scripts/python from tasks.json
victor-Lopez25 c7c9b79
Merge remote-tracking branch 'origin/hotfix(hal_conf)-Add-SD-define' …
Cantonplas 9b29433
Hotfix code generation
Cantonplas bfa7450
Merge remote-tracking branch 'origin/hotfix!-virtualbinpython-always-…
Cantonplas 7e1fcd1
Now packets dont duplicate constructor variables
Cantonplas 00cd59b
Merge branch 'main' into FW-301/Execute_Code_gen_on_cmake
Cantonplas 13c49ca
Revert "Merge remote-tracking branch 'origin/hotfix!-virtualbinpython…
Cantonplas 89491df
Remove pedantic from cmake
Cantonplas 7670425
Modify OrderPackets class to include public access
Cantonplas 18c2a93
Cleanup template and output
victor-Lopez25 a366abe
Further cleanup templates and output
victor-Lopez25 2fdb4d8
Functions per packet implemented
Cantonplas 2043c87
Now flags and cb are generated
Cantonplas 7073fdd
New update method
Cantonplas 74d2ba7
Testing stuff
Cantonplas 6325de4
Hope its the final version jesus
Cantonplas 9813b0e
Change public and private from datapackets that was incorrect
Cantonplas effb9d7
Rename .gitignore to .gitkeep
Cantonplas 3f6ea0a
Deleted self scheduler
Cantonplas 776b77d
Pene
Cantonplas e5e22ad
Espacio extra que victor le gusta
Cantonplas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule JSON_ADE
updated
from 76d1b3 to ee857f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 30 additions & 17 deletions
47
Core/Inc/Code_generation/Packet_generation/OrderTemplate.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,43 @@ | ||
| #pragma once | ||
| #include "ST-LIB.hpp" | ||
|
|
||
| //Order packets for {{board}} -AUTOGENERATED CODE, DO NOT MODIFY- | ||
| /*Order packets for {{board}} | ||
| -AUTOGENERATED CODE, DO NOT MODIFY- */ | ||
|
|
||
|
|
||
| {%for packet in packets%}extern void {{packet.name}}_cb(); | ||
| {% endfor %} | ||
| class OrderPackets{ | ||
| {% for enum in enums %}enum class {{enum.name}}:uint8_t | ||
| public: | ||
| {% for enum in enums -%} | ||
| enum class {{enum.name}} : uint8_t | ||
| { | ||
| {% for value in enum["values"] %}{{value}}={{loop.index0}}{%if not loop.last%},{%endif%} | ||
| {% endfor %}}; | ||
| {%- for value in enum["values"] %} | ||
| {{value}} = {{loop.index0}}, | ||
| {%- endfor %} | ||
| }; | ||
| {% endfor %} | ||
|
|
||
| {% for packet in packets -%} | ||
| inline static bool {{packet.name}}_flag{false}; | ||
| {% endfor %} | ||
|
|
||
|
|
||
| OrderPackets() = default; | ||
|
|
||
| private: | ||
| uint32_t id{0}; | ||
| public: | ||
| {%for packet in packets%}HeapOrder* {{packet.name}}; | ||
| {% endfor %} | ||
|
|
||
| OrderPackets({%for value in data %}{{value.type}} &{{value.name}}{%if not loop.last%},{%endif%}{%endfor%}) | ||
| { | ||
| {% for packet in packets -%} | ||
| inline static HeapOrder *{{packet.name}}{nullptr}; | ||
| {% endfor %} | ||
|
|
||
| {% for packet in packets -%} | ||
| static void {{packet.name}}_init({% for variable in packet.variables %}{{variable.type}} &{{variable.name}}{% if not loop.last %}, {% endif %}{% endfor %}) | ||
| { | ||
| {{packet.name}} = new HeapOrder({{packet.id}}, &{{packet.name}}_cb{% if packet.variables %}, {% for variable in packet.variables %}&{{variable.name}}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}); | ||
| } | ||
| {% endfor %} | ||
|
|
||
| {% for packet in packets %}{{packet.name}}=new HeapOrder({{packet.id}},&{{packet.name}}_cb{% if packet.data%},{{packet.data}}{% endif%}); | ||
| private: | ||
| {% for packet in packets -%} | ||
| static void {{packet.name}}_cb() | ||
| { | ||
| {{packet.name}}_flag = true; | ||
| } | ||
| {% endfor %} | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ST-LIB
updated
from e2a561 to 80d9ef
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.