rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
bench_state_t Struct Reference

The bench readings in the units a person reads: V, A, W and rpm, with their peaks. More...

#include <bench_state.h>

Data Fields

float voltage
float current
float power
float rpm
float temp_esc
float temp_motor
float charge_mah
float energy_wh
float voltage_min
float current_max
float power_max
float rpm_max
uint16_t flags
uint8_t counted
 Which of charge_mah and energy_wh the panel has counted this run (BENCH_COUNTED_*).
bool valid
bool sag_seeded
 Whether voltage_min is a measurement yet.
float esc_voltage
float esc_current
uint8_t esc_ok
bool clipped
 The INA228 read its current at the end of its range in the last window or since the arm (SENSE FLAGS bit 3): current and power, or their peaks, are bounds and not values.
bool servo_new
uint8_t servo_ok
uint8_t servo_no_current
uint8_t servo_no_voltage
uint16_t servo_window
int16_t servo_mean_ma [3]
int16_t servo_max_ma [3]
uint16_t servo_min_mv [3]
bench_chw_t chw
 The same window of every channel the map reads, ok 0 for none: on the row of servo_window, as SERVO_SENSE's CH2 and CH3 are.

Detailed Description

The bench readings in the units a person reads: V, A, W and rpm, with their peaks.

Field Documentation

◆ charge_mah

float bench_state_t::charge_mah

charge drawn, mAh

◆ counted

uint8_t bench_state_t::counted

Which of charge_mah and energy_wh the panel has counted this run (BENCH_COUNTED_*).

Not on the wire: the panel counts both itself, see bench_totals_t, and a total it has not counted is shown and logged as absent rather than as 0.

◆ current

float bench_state_t::current

A

◆ energy_wh

float bench_state_t::energy_wh

energy drawn, Wh

◆ esc_current

float bench_state_t::esc_current

A

◆ esc_voltage

float bench_state_t::esc_voltage

V

◆ flags

uint16_t bench_state_t::flags

◆ power

float bench_state_t::power

W

◆ rpm

float bench_state_t::rpm

motor speed, rpm

◆ sag_seeded

bool bench_state_t::sag_seeded

Whether voltage_min is a measurement yet.

The sag floor is the one peak that cannot start at the live reading when there is no live reading: a run whose first samples arrive before the first voltage does would keep a floor of 0V and reject every real reading after it, and report a collapsed pack for the whole run.

◆ temp_esc

float bench_state_t::temp_esc

C

◆ temp_motor

float bench_state_t::temp_motor

C

◆ valid

bool bench_state_t::valid

a poll has answered at least once

◆ voltage

float bench_state_t::voltage

V


The documentation for this struct was generated from the following file: