OpenC3/cosmos

View on GitHub
openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST2/procedures/utilities/collect.py

Summary

Maintainability
A
0 mins
Test Coverage
load_utility("<%= target_name %>/procedures/utilities/clear.py")


def collect(type, duration, call_clear=False):
    # Get the current collects telemetry point
    collects = tlm("<%= target_name %> HEALTH_STATUS COLLECTS")

    # Command the collect
    cmd(f"<%= target_name %> COLLECT with TYPE {type}, DURATION {duration}")

    # Wait for telemetry to update
    wait_check(f"<%= target_name %> HEALTH_STATUS COLLECTS == {collects + 1}", 10)

    if call_clear:
        clear()