fn update_state(&mut self, thermal_load: ThermalLoad) -> Option<u32> {
        let new_state = Self::determine_thermal_state(thermal_load, &self.trip_points);
        if new_state != self.current_state {
            self.current_state = new_state;
            self.inspect_state.set(new_state.into());
            Some(new_state)
        } else {
            None
        }
    }
/// Given a thermal load, determine and update the current thermal state locally. Returns the
/// new state if the state was changed, otherwise returns None.
Given a thermal load, determine and update the current thermal state locally. Returns the
new state if the state was changed, otherwise returns None.
Given a thermal load determine and update the current thermal state locally . Returns the new state if the state was changed otherwise returns None .
fn update_state(&mut self, thermal_load: ThermalLoad) -> Option<u32> {
        let new_state = Self::determine_thermal_state(thermal_load, &self.trip_points);
        if new_state != self.current_state {
            self.current_state = new_state;
            self.inspect_state.set(new_state.into());
            Some(new_state)
        } else {
            None
        }
    }
fn update_state ( & mut self , thermal_load : ThermalLoad ) -> Option < u32 > { let new_state = Self :: determine_thermal_state ( thermal_load , & self . trip_points ) ; if new_state != self . current_state { self . current_state = new_state ; self . inspect_state . set ( new_state . into ( ) ) ; Some ( new_state ) } else { None } }
Given a thermal load, determine and update the current thermal state locally.
Given a thermal load determine and update the current thermal state locally .
&mut self
thermal_load
ThermalLoad
&mut self
thermal_load
ThermalLoad