Skip to content

Commit eba443b

Browse files
committed
chore: update docs to be referenced
1 parent 47eb2b9 commit eba443b

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,11 @@ We have some zephyr rtos projects under zephyr_projects. To build/develop them y
1616
### Arduino
1717
We have some arduino projects, under arduino_firmware.
1818

19-
### common libraries
20-
Under common_libs/ we have our common libraries. These should be hardware agnostic, modular and testable.
19+
### Common Libraries
20+
Under common_libraries/ we have our common libraries. These should be hardware agnostic, modular and testable.
2121
We have an example here, that shows the general workflow for creating a common library module, including Catch2 testing.
2222

23-
#### Low Pass FIR Filter
24-
This is an FIR filter that can be used on any unsigned 32-bit integers. You can specify the order (AKA. the number of previous data points the algorithm considers) when creating an instance of LowPassFIRFilter (default order of 1). The following example filters incoming data with an order of 1:
25-
```cpp
26-
#include <low_pass_fir_filter.hpp>
27-
28-
LowPassFIRFilter filter;
29-
30-
void process_incoming_data(unsigned int input) {
31-
unsigned int filtered_input = filter.update(input);
32-
send_filtered_data_to_arm(filtered_input);
33-
}
34-
```
35-
36-
1. Constructor: defaults to order of 1
37-
2. Buffer: used to store previous data points
38-
3. Update function:
39-
- Fills the entire buffer with the first input to simplify the algorithm (otherwise cases for when the buffer is not full yet have to be handled differently).
40-
- Uses sliding window to calculate the average of the correct set of data points.
23+
1. [Low pass FIR filter](common_libraries/low_pass_fir_filter/README.md)
4124

4225
### Testing
4326
We use Catch2 for testing cpp and c code. It's an easy to use, and easy to integrate tool for cpp unit tests.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Low Pass FIR Filter
2+
This is an FIR filter that can be used on any unsigned 32-bit integers. You can specify the order (AKA. the number of previous data points the algorithm considers) when creating an instance of LowPassFIRFilter (default order of 1). The following example filters incoming data with an order of 1:
3+
```cpp
4+
#include <low_pass_fir_filter.hpp>
5+
6+
LowPassFIRFilter filter;
7+
8+
void process_incoming_data(unsigned int input) {
9+
unsigned int filtered_input = filter.update(input);
10+
send_filtered_data_to_arm(filtered_input);
11+
}
12+
```
13+
14+
1. Constructor: defaults to order of 1
15+
2. Buffer: used to store previous data points
16+
3. Update function:
17+
- Fills the entire buffer with the first input to simplify the algorithm (otherwise cases for when the buffer is not full yet have to be handled differently).
18+
- Uses sliding window to calculate the average of the correct set of data points.

0 commit comments

Comments
 (0)