Skip to main content

pamoja_power_plan_mode_while_charging

Function pamoja_power_plan_mode_while_charging 

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

Returns the mode a plan calls for, easing off one step while charging.

A node taking charge is heading the right way, so it moves one step toward full duty rather than holding at what the charge alone would call for.

§Arguments

  • plan - the power plan.
  • 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.