Skip to content

Commit afefe1d

Browse files
committed
added input ports
1 parent a96b548 commit afefe1d

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

FprimeZephyrReference/Components/Burnwire/Burnwire.fpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ module Components {
2929
# @ Example port: receiving calls from the rate group
3030
# sync input port run: Svc.Sched
3131

32+
@ Port getting start signal
33+
sync input port burnStart: Fw.Signal
34+
35+
@ Port getting stop signal
36+
sync input port burnStop: Fw.Signal
37+
3238
@ Input Port to get the rate group
3339
sync input port schedIn: Svc.Sched
3440

FprimeZephyrReference/Components/Burnwire/Burnwire.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#ifndef Components_Burnwire_HPP
88
#define Components_Burnwire_HPP
99

10+
#include <atomic>
1011
#include "FprimeZephyrReference/Components/Burnwire/BurnwireComponentAc.hpp"
1112

1213
namespace Components {
@@ -48,11 +49,10 @@ class Burnwire final : public BurnwireComponentBase {
4849
//! Handler implementation for command STOP_BURNWIRE
4950
void STOP_BURNWIRE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) override;
5051

51-
Fw::On m_state = Fw::On::OFF; // keeps track if burnwire is on or off
52-
std::atomic<U32>
53-
m_safetyCounter; // makes this an atomic variable (so its set only in one comnmdn), so you won't have smth so
54-
// you read and write half the value bc a corrupted read could be dangerouts
55-
U32 m_safetyMaxCount = 5; // make this a aparamater
52+
Fw::On m_state = Fw::On::OFF; // keeps track if burnwire is on or off
53+
std::atomic<U32> m_safetyCounter; // makes this an atomic variable (so its set only in one command),
54+
// you read and write half the value bc a corrupted read could be dangerouts
55+
U32 m_safetyMaxCount = 5; // make this a aparamater
5656
};
5757

5858
} // namespace Components

FprimeZephyrReference/Components/Burnwire/docs/sdd.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,12 @@ Add requirements in the chart below
1616
|BW-005|The burnwire component shall be controlled by a safety timeout attached to a 1Hz rate group that can be changed within the code |Integration Test|
1717
|BW-006|The burnwire safety time shall emit an event when it starts and stops |Integration Test|
1818

19-
20-
Use the Zephyr GPIO driver --> so that the GPIO driver can be changed instead of being hardcoded
21-
checking is it calling that set port, break the two layers out
22-
Write, read get interrupt from GPIO
23-
single port of type driver.gPIO write that is a port on your FPP
24-
25-
2619
## Port Descriptions
2720
Name | Type | Description |
2821
|----|---|---|
29-
|----|`Fw::Signal`|Receive stop signal to stop the burnwire|
30-
|----|`Fw::Signal`|Receive start signal to start burnwire|
31-
|----|`Drv::GpioWrite`|Control GPIO state to driver|
22+
|burnStop|`Fw::Signal`|Receive stop signal to stop the burnwire|
23+
|burnStart|`Fw::Signal`|Receive start signal to start burnwire|
24+
|gpioSet|`Drv::GpioWrite`|Control GPIO state to driver|
3225
|schedIn|[`Svc::Sched`]| run | Input | Synchronous | Receive periodic calls from rate group
3326

3427

@@ -62,4 +55,4 @@ Add unit test descriptions in the chart below
6255

6356
## Parameter
6457
| Name | Description |
65-
| ---- | ----------- |
58+
| m_safetyMaxCount | The maximum amount that the burnwire will burn before stopping itself for safety |

FprimeZephyrReference/ReferenceDeployment/Top/ReferenceDeploymentTopology.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <zephyr/drivers/gpio.h>
1515

1616
static const struct gpio_dt_spec ledGpio = GPIO_DT_SPEC_GET(DT_ALIAS(led0), gpios);
17-
// static const struct gpio_dt_spec ledGpio = GPIO_DT_SPEC_GET(DT_ALIAS(burnwire0), gpios);
17+
// static const struct gpio_dt_spec burnwire0Gpio = GPIO_DT_SPEC_GET(DT_ALIAS(burnwire0), gpios);
1818

1919
static const struct gpio_dt_spec burnwire0Gpio = {
2020
.port = DEVICE_DT_GET(DT_NODELABEL(gpio0)),

0 commit comments

Comments
 (0)