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

Fix typo on template file names #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/component-implementation-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ Exit the text editor, and run the following in the `led-blinker/Components/Led`
fprime-util impl
```

This command will auto generate two files: Led.hpp-template and Led.cpp-template. These files contain the stub implementation for the component. These should now include stubs for this newly added command.
This command will auto generate two files: Led.template.hpp and Led.template.cpp. These files contain the stub implementation for the component. These should now include stubs for this newly added command.

Inside your `led-blinker/Components/Led` directory, open `Led.hpp-template` and copy the following block of code. Paste it as a private function above the private member variabls in `Led.hpp`.
Inside your `led-blinker/Components/Led` directory, open `Led.template.hpp` and copy the following block of code. Paste it as a private function above the private member variabls in `Led.hpp`.

```cpp
//! Implementation for BLINKING_ON_OFF command handler
Expand All @@ -156,7 +156,7 @@ Inside your `led-blinker/Components/Led` directory, open `Led.hpp-template` and
);
```

Inside your `led-blinker/Components/Led` directory, open `Led.cpp-template` and copy the following block of code and paste it into `Led.cpp` below the destructor.
Inside your `led-blinker/Components/Led` directory, open `Led.template.cpp` and copy the following block of code and paste it into `Led.cpp` below the destructor.

```cpp
void Led ::
Expand All @@ -171,7 +171,7 @@ Inside your `led-blinker/Components/Led` directory, open `Led.cpp-template` and
}
```

> This pattern of copying implementations from *-template files into our cpp and hpp files will be repeated throughout the rest of this tutorial.
> This pattern of copying implementations from *.template files into our cpp and hpp files will be repeated throughout the rest of this tutorial.


Now we will implement the behavior of the `BLINKING_ON_OFF` command. An initial implementation is shown below and may be copied into `Led.cpp` in-place of the stub we just copied in.
Expand Down