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 SignalGen commands in integration tests #3075

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Ref/SignalGen/SignalGen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace Ref {
U32 cmdSeq /*!< The command sequence number*/
) final;

//! Handler implementation for command SignalGen_Dp
//! Handler implementation for command Dp
//!
//! Signal Generator Settings
void Dp_cmdHandler(
Expand Down
2 changes: 1 addition & 1 deletion Ref/SignalGen/docs/sdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The `Ref::SignalGen` component has the following component diagram:

#### 3.1.2 Data Products

The `Ref::SignalGen` component will generate data products using the `SignalGen_Dp` command.
The `Ref::SignalGen` component will generate data products using the `Dp` command.
It will demonstrate the two different ways to request data product buffers and will generate
a data product based on storing a commanded number of

Expand Down
8 changes: 3 additions & 5 deletions Ref/test/int/ref_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,16 @@ def test_active_logger_filter(fprime_test_api):

def test_signal_generation(fprime_test_api):
"""Tests the behavior of signal gen component"""
fprime_test_api.send_and_assert_command(
"Ref.SG4.SignalGen_Settings", [1, 5, 0, "SQUARE"]
)
fprime_test_api.send_and_assert_command("Ref.SG4.Settings", [1, 5, 0, "SQUARE"])
# First telemetry item should fill only the first slot of the history
history = [0, 0, 0, 5]
pair_history = [{"time": 0, "value": value} for value in history]
info = {"type": "SQUARE", "history": history, "pairHistory": pair_history}
fprime_test_api.send_and_assert_command("Ref.SG4.SignalGen_Toggle")
fprime_test_api.send_and_assert_command("Ref.SG4.Toggle")
fprime_test_api.assert_telemetry("Ref.SG4.History", history, timeout=6)
fprime_test_api.assert_telemetry("Ref.SG4.PairHistory", pair_history, timeout=1)
fprime_test_api.assert_telemetry("Ref.SG4.Info", info, timeout=1)
fprime_test_api.send_and_assert_command("Ref.SG4.SignalGen_Toggle")
fprime_test_api.send_and_assert_command("Ref.SG4.Toggle")


def test_seqgen(fprime_test_api):
Expand Down
Loading