-
Notifications
You must be signed in to change notification settings - Fork 223
thermal: distinguish between real and made up temperatures #2386
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,11 +82,49 @@ enum Trace { | |
| AutoState(#[count(children)] ThermalAutoState), | ||
| PowerDownDueTo { | ||
| sensor_id: SensorId, | ||
| temperature: units::Celsius, | ||
| /// The thermal model's worst-case temperature projection for this | ||
| /// sensor. | ||
| /// | ||
| /// Note that this may not be an *actual temperature measurement* | ||
| /// from this sensor. Instead, it is projected from the last successful | ||
| /// temperature reading, the lag since that measurement was received, | ||
| /// and the thermal model's slew rate for the component. | ||
| /// | ||
| /// This ringbuf entry is always followed by a [`LastActualTemperature`] | ||
| /// entry, which records the last actual temperature measurement | ||
| /// reported by the sensor. | ||
| worst_case_temp: units::Celsius, | ||
| }, | ||
| CriticalDueTo { | ||
| sensor_id: SensorId, | ||
| /// The thermal model's worst-case temperature projection for this | ||
| /// sensor. | ||
| /// | ||
| /// Note that this may not be an *actual temperature measurement* | ||
| /// from this sensor. Instead, it is projected from the last successful | ||
| /// temperature reading, the lag since that measurement was received, | ||
| /// and the thermal model's slew rate for the component. | ||
| /// | ||
| /// This ringbuf entry is always followed by a [`LastActualTemperature`] | ||
| /// entry, which records the last actual temperature measurement | ||
| /// reported by the sensor. | ||
| worst_case_temp: units::Celsius, | ||
| }, | ||
| /// The last actual temperature measurement reported by a sensor. | ||
| /// | ||
| /// This is recorded after every [`CriticalDueTo`] or [`PowerDownDueTo`] | ||
| /// entry so that the last known real life temperature can be compared to | ||
| /// the worst-case temperature projection that caused a thermal loop state | ||
| /// transition. | ||
| #[count(skip)] | ||
| LastRealTemperature { | ||
| sensor_id: SensorId, | ||
| /// The most recent real life (not fake) temperature measurement from | ||
| /// the sensor. | ||
| temperature: units::Celsius, | ||
| /// The (approximate) time, in seconds, since the real life temperature | ||
| /// measurement was received. | ||
| age_s: f32, | ||
| }, | ||
|
Comment on lines
+113
to
128
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I split this into its own ringbuf entries because adding two more 32-bit fields to
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was going to ask this exact question, good anticipation! :-) |
||
| /// Total duration spent in the overheated control regime. | ||
| #[count(skip)] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.youtube.com/watch?v=GM-e46xdcUo