Skip to main content

pamoja_power_plan_with_hysteresis

Function pamoja_power_plan_with_hysteresis 

Source
#[unsafe(no_mangle)]
pub extern "C" fn pamoja_power_plan_with_hysteresis( plan: PamojaPowerPlan, margin: f32, ) -> PamojaPowerPlan
Expand description

Returns a plan with the hysteresis margin moved.

§Arguments

  • plan - the plan to adjust.
  • margin - how far above a threshold the charge must climb before the plan leaves the lower mode; 0.0 switches at the thresholds themselves, and a margin that is negative or not a number is taken as 0.0.

§Returns

The adjusted plan.