phytrace_builder_set_power

Function phytrace_builder_set_power 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn phytrace_builder_set_power( builder: *mut PhyTraceBuilderHandle, soc_pct: f64, voltage_v: f64, current_a: f64, temperature_c: f64, is_charging: i32, health_pct: f64, ) -> i32
Expand description

Set the power domain on the builder.

Floating-point parameters use f64::NAN for “not set”. is_charging: 1 = true, 0 = false, -1 = not set.

§Parameters

  • soc_pct — State of charge percentage (0-100), or NAN
  • voltage_v — Battery voltage, or NAN
  • current_a — Battery current in amps, or NAN
  • temperature_c — Battery temperature in Celsius, or NAN
  • is_charging — 1/0/-1
  • health_pct — State of health percentage (0-100), or NAN