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

xxxx_fault.base Provides Unreliable Telemetry #859

Open
shihaocao opened this issue Feb 5, 2022 · 0 comments
Open

xxxx_fault.base Provides Unreliable Telemetry #859

shihaocao opened this issue Feb 5, 2022 · 0 comments

Comments

@shihaocao
Copy link
Collaborator


void Fault::evaluate(bool flag) {
    if (flag) signal();
    else unsignal();
}

void Fault::signal() {
    if (*cc > static_cast<unsigned int>(last_fault_time) || *cc == 0) {
        num_consecutive_signals++;
        last_fault_time = *cc;
    }
    if (num_consecutive_signals > persistence_f.get()) {
        set(true);
    }
    else
        set(false);
}

void Fault::unsignal() {
    num_consecutive_signals = 0;
}

Lines 23-42 in Fault.cpp as shown above have the unfortunate side effect that falling edges (signalling conditions of Faults going from true, to false) do not cause the xxx_fault.base field to become faults once a faulting condition goes away. This is because unsignal() does not have a corresponding set(false) call.

This is explicitly apparent in all of the ADCS telemetry from flight because the adcs_monitor.functional_fault.base field shows as true, along with wheel1_fault.base, wheel2_fault.base, wheel3_fault.base, wheel_pot_fault.base, despite the corresponding havt_deviceX fields all reporting as True, indicating the devices are working.

However, this does not cause bugged behavior in flight (other than bad telemetry).
When push comes to shove, and is_faulted() is actually called in the fault handler, there is proper either set(true) or set(false) calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant