Comments (7)
The fix that is currently on the devel
branch should correct that, I'll wait on other updates to push it to master
.
from cookiecutter-fprime-deployment.
Well, thats a bug. The proposed fix is also buggy, but I agree that it should follow the pattern in the .cpp
file. The cheetah template from F Prime upstream looks like this:
// ----------------------------------------------------------------------
// Construction, initialization, and destruction
// ----------------------------------------------------------------------
${name}ComponentImpl ::
\#if FW_OBJECT_NAMES == 1
${name}ComponentImpl(
$emit_non_port_params([ $param_compName ])
) :
${component_base}(compName)
\#else
${name}ComponentImpl(void)
\#endif
{
}
So I think I will use that pattern.
from cookiecutter-fprime-deployment.
I think the fix actually ends up being this:
{{cookiecutter.component_slug}}{{cookiecutter.component_explicit_component_suffix}}{{cookiecutter.component_impl_suffix}} ::
#if FW_OBJECT_NAMES == 1
{{cookiecutter.component_slug}}{{cookiecutter.component_explicit_component_suffix}}{{cookiecutter.component_impl_suffix}}(
const char *const compName
) :
{{cookiecutter.component_slug}}ComponentBase(compName),
#else
{{cookiecutter.component_slug}}{{cookiecutter.component_explicit_component_suffix}}{{cookiecutter.component_impl_suffix}}(void),
#endif
from cookiecutter-fprime-deployment.
I think it should not have ,
at the end of the alternate constructor header definition. Or does that work?
from cookiecutter-fprime-deployment.
I believe you need the comma for constructor initialization of member variables, which I am using. So, yes I think it works just fine.
from cookiecutter-fprime-deployment.
I just checked and that gives:
error: expected unqualified-id before '{' token
,
is not a valid character to come directly after the constructor header definition. You could put :
but only if followed by a member variable constructor initialization. Otherwise, it gives the same error as above. ,
is only meant for separating member variables in the constructor initialization section.
from cookiecutter-fprime-deployment.
Oh, I see, you are correct, the #if
segment has ) :
but I messed up the #else
segment by putting ),
.
from cookiecutter-fprime-deployment.
Related Issues (15)
- Template Should Generate ``Ref`` Deployment by Default
- Incomplete component #include path in Components.hpp
- hardwareRateDriver not started in Topology.cpp HOT 1
- Incorrect Use of Baremetal Scheduler Flag in Deployment Level CMakeLists.txt for Fprime 2.X HOT 2
- Feature Request: Add Option for UART Driver Baud Rate HOT 1
- Missing regCommands() calls in Topology.cpp
- Double instantiation of Os::Log logger
- Template does not correctly handle nested namespaces in component
- Spelling mistake
- 1Hz rate group component declaration missing HOT 2
- Template cannot easily handle Top Level Deployment folders
- Documentation link to .md
- Using cookiecutter --overwrite deletes existing code HOT 2
- Unnecessary Options when building for platforms other than Arduino HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookiecutter-fprime-deployment.