Skip to main content

pamoja_power_plan_next_mode_while_charging

Function pamoja_power_plan_next_mode_while_charging 

Source
#[unsafe(no_mangle)]
pub extern "C" fn pamoja_power_plan_next_mode_while_charging( plan: PamojaPowerPlan, current: PamojaPowerMode, soc: f32, charging: u8, ) -> PamojaPowerMode
Expand description

Returns the mode a node in a given mode moves to, easing off one step while charging.

§Arguments

  • plan - the power plan.
  • current - the mode the node is running in, as this returned it last time.
  • soc - the battery state of charge, from 0.0 through 1.0.
  • charging - 1 if the node is charging, 0 if it is not.

§Returns

The mode the node should run in next.