Skip to content

Commit

Permalink
Fix SignalGen commands in integration tests (#3075)
Browse files Browse the repository at this point in the history
* Fix SignalGen commands in integration tests

* Fix formatting
  • Loading branch information
thomas-bc authored Dec 11, 2024
1 parent e957d40 commit 4d1ab75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
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

0 comments on commit 4d1ab75

Please sign in to comment.