Skip to content

Commit 1664683

Browse files
committed
appease linter
1 parent 58d2293 commit 1664683

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ module Components {
2626
# sync input port run: Svc.Sched
2727
#output port Status: Drv.GpioRead
2828
#We will not be putting a Drv.GpioRead port here, we are using the Gpio Driver component which has this already!
29-
29+
3030
@ Port sending calls to the GPIO driver
3131
output port gpioSet: Drv.GpioWrite
3232

33-
34-
# Input that will be used by other components if they want to force a reset
33+
34+
# Input that will be used by other components if they want to force a reset
3535
# (off and on again) of the load switch
3636
sync input port Reset: Fw.Signal
3737

FprimeZephyrReference/Components/LoadSwitch/LoadSwitch.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#ifndef Components_LoadSwitch_HPP
88
#define Components_LoadSwitch_HPP
99

10-
#include "FprimeZephyrReference/Components/LoadSwitch/LoadSwitchComponentAc.hpp"
1110
#include <zephyr/kernel.h>
11+
#include "FprimeZephyrReference/Components/LoadSwitch/LoadSwitchComponentAc.hpp"
1212

1313
// Forward declare Zephyr types to avoid header conflicts
1414
struct device;
@@ -50,7 +50,6 @@ class LoadSwitch final : public LoadSwitchComponentBase {
5050
//! Handler implementation for Reset
5151
void Reset_handler(FwIndexType portNum //!< The port number
5252
) override;
53-
5453
};
5554

5655
} // namespace Components
Lines changed: 1 addition & 1 deletion
Loading

FprimeZephyrReference/test/int/load_switch_test.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,34 @@
44
Integration tests for the Load-Switch component.
55
"""
66

7-
import time
8-
97
import pytest
108
from common import proves_send_and_assert_command
119
from fprime_gds.common.data_types.ch_data import ChData
1210
from fprime_gds.common.testing_fw.api import IntegrationTestAPI
1311

1412
loadswitch = "ReferenceDeployment.loadswitch"
1513

14+
1615
@pytest.fixture(autouse=True)
1716
def ensure_loadswitch_off(fprime_test_api: IntegrationTestAPI, start_gds):
1817
"""Ensure LoadSwitch starts in OFF state"""
1918
turn_off(fprime_test_api)
2019
yield
2120
turn_off(fprime_test_api)
2221

22+
2323
def turn_on(fprime_test_api: IntegrationTestAPI):
2424
"""Helper function to turn on the loadswitch"""
2525
proves_send_and_assert_command(
2626
fprime_test_api,
2727
f"{loadswitch}.TURN_ON",
2828
)
2929

30+
3031
def turn_off(fprime_test_api: IntegrationTestAPI):
3132
"""Helper function to turn off the loadswitch"""
32-
proves_send_and_assert_command(
33-
fprime_test_api,
34-
f"{loadswitch}.TURN_OFF"
35-
)
33+
proves_send_and_assert_command(fprime_test_api, f"{loadswitch}.TURN_OFF")
34+
3635

3736
def get_is_on(fprime_test_api: IntegrationTestAPI) -> int:
3837
"""Helper function to request packet and get fresh IsOn telemetry"""
@@ -46,11 +45,13 @@ def get_is_on(fprime_test_api: IntegrationTestAPI) -> int:
4645
)
4746
return result.get_val()
4847

48+
4949
def test_01_loadswitch_telemetry_basic(fprime_test_api: IntegrationTestAPI, start_gds):
5050
"""Test that we can read IsOn telemetry"""
5151
value = get_is_on(fprime_test_api)
5252
assert value in (0, 1), f"IsOn should be 0 or 1, got {value}"
5353

54+
5455
def test_02_turn_on_sets_high(fprime_test_api: IntegrationTestAPI, start_gds):
5556
"""
5657
Test TURN_ON command sets GPIO high, emits ON event, and updates telemetry
@@ -66,6 +67,7 @@ def test_02_turn_on_sets_high(fprime_test_api: IntegrationTestAPI, start_gds):
6667
value = get_is_on(fprime_test_api)
6768
assert value == 1, f"Expected IsOn = 1 after TURN_ON, got {value}"
6869

70+
6971
def test_03_turn_off_sets_low(fprime_test_api: IntegrationTestAPI, start_gds):
7072
"""
7173
Test TURN_OFF command sets GPIO low, emits OFF event, and updates telemetry
@@ -79,4 +81,4 @@ def test_03_turn_off_sets_low(fprime_test_api: IntegrationTestAPI, start_gds):
7981

8082
# Confirm telemetry IsOn is 0
8183
value = get_is_on(fprime_test_api)
82-
assert value == 0, f"Expected IsOn = 0 after TURN_OFF, got {value}"
84+
assert value == 0, f"Expected IsOn = 0 after TURN_OFF, got {value}"

0 commit comments

Comments
 (0)