Skip to content

feat: adc scheduling and data reading #15

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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

NoahSprenger
Copy link
Contributor

No description provided.


// Insane temperature ranges that should never be reached.
// Hitting this is a strong indicator of a bug in the Argus system.
_ => panic!("T < -270 or T > 1372 celcius")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on the panic here? Theoretically these temperatures are not attainable for Argus, however we could return some number like -1.0 as it was before my refactoring if you prefer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is more of an error than a panic. Yes you are totally correct this rocket should never get that hot 🌶️ but I am strongly against panics that are not in init functions. You can create a thermocouple conversion error type and then add this to hydra error manager so that we can capture it in the error manager and just call xyz.temp_convert()?;
I also am not a fan of returning -1 because it can be really cryptic and we can just throw an error nicely

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't like returning -1, it was just the prior implementation. We can implement an error for this of course, and I pondered that, but was just concerned about potentially complicating the API when hitting this would indicate much larger issues. I guess we can just handle this or whatever, and if it hits an error, we trigger a fault state in the SM and re-calibrate or something?

Copy link
Contributor Author

@NoahSprenger NoahSprenger Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah exactly, something like this would be a fault and we could for example take that temperature sensor offline if it persists or we just outright take it offline.

Copy link
Contributor Author

@NoahSprenger NoahSprenger Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way we can reduce the time taken to get back to normal execution compared to a panic

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Do you want to implement that quickly then? I probably won't have time until after the reading break.

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

Successfully merging this pull request may close these issues.

2 participants